summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTatsuo Ishii <ishii@postgresql.org>1999-08-25 12:01:45 +0000
committerTatsuo Ishii <ishii@postgresql.org>1999-08-25 12:01:45 +0000
commitb9d202fb0e2f915d9883a583116ac17e15831490 (patch)
treec34504c47e172edb74c13b08377b96631c987dd1 /src
parent366f6ce2556ff5a6b4c00283128cf4d50cfd6847 (diff)
Sorry, I accidentaly reverted to 6.5.1 vacuum.c.
Now everything should be ok.
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/vacuum.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 946cdc3fb19..0ce01efd574 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -7,50 +7,38 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.110.2.2 1999/08/25 11:27:06 ishii Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.110.2.3 1999/08/25 12:01:45 ishii Exp $
*
*-------------------------------------------------------------------------
*/
#include <sys/types.h>
#include <sys/file.h>
-#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "postgres.h"
-#include "miscadmin.h"
#include "access/genam.h"
#include "access/heapam.h"
-#include "access/transam.h"
-#include "access/xact.h"
#include "catalog/catalog.h"
#include "catalog/catname.h"
#include "catalog/index.h"
-#include "catalog/pg_class.h"
-#include "catalog/pg_index.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_statistic.h"
#include "catalog/pg_type.h"
#include "commands/vacuum.h"
-#include "fmgr.h"
+#include "miscadmin.h"
#include "parser/parse_oper.h"
-#include "storage/bufmgr.h"
-#include "storage/bufpage.h"
-#include "storage/shmem.h"
#include "storage/smgr.h"
-#include "storage/itemptr.h"
-#include "storage/lmgr.h"
#include "utils/builtins.h"
#include "utils/inval.h"
-#include "utils/mcxt.h"
#include "utils/portal.h"
#include "utils/relcache.h"
#include "utils/syscache.h"
#ifndef HAVE_GETRUSAGE
-#include <rusagestub.h>
+#include "rusagestub.h"
#else
#include <sys/time.h>
#include <sys/resource.h>
@@ -1294,9 +1282,9 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
to_item = i;
to_vpd = fraged_pages->vpl_pagedesc[to_item];
}
- to_vpd->vpd_free -= DOUBLEALIGN(tlen);
+ to_vpd->vpd_free -= MAXALIGN(tlen);
if (to_vpd->vpd_offsets_used >= to_vpd->vpd_offsets_free)
- to_vpd->vpd_free -= DOUBLEALIGN(sizeof(ItemIdData));
+ to_vpd->vpd_free -= MAXALIGN(sizeof(ItemIdData));
(to_vpd->vpd_offsets_used)++;
if (free_vtmove == 0)
{
@@ -2809,7 +2797,7 @@ static bool
vc_enough_space(VPageDescr vpd, Size len)
{
- len = DOUBLEALIGN(len);
+ len = MAXALIGN(len);
if (len > vpd->vpd_free)
return false;
@@ -2819,7 +2807,7 @@ vc_enough_space(VPageDescr vpd, Size len)
return true; /* and len <= free_space */
/* ok. noff_usd >= noff_free and so we'll have to allocate new itemid */
- if (len + DOUBLEALIGN(sizeof(ItemIdData)) <= vpd->vpd_free)
+ if (len + MAXALIGN(sizeof(ItemIdData)) <= vpd->vpd_free)
return true;
return false;