mirror of
https://github.com/postgres/postgres.git
synced 2025-05-08 07:21:33 +03:00
Reverse out vacuum change.
This commit is contained in:
parent
2ac3173d75
commit
6799af7d80
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.86 1998/10/09 21:28:40 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.87 1998/10/09 21:31:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -103,8 +103,6 @@ static int vc_cmp_blk(char *left, char *right);
|
|||||||
static int vc_cmp_offno(char *left, char *right);
|
static int vc_cmp_offno(char *left, char *right);
|
||||||
static bool vc_enough_space(VPageDescr vpd, Size len);
|
static bool vc_enough_space(VPageDescr vpd, Size len);
|
||||||
|
|
||||||
void test(Oid relid);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
vacuum(char *vacrel, bool verbose, bool analyze, List *va_spec)
|
vacuum(char *vacrel, bool verbose, bool analyze, List *va_spec)
|
||||||
{
|
{
|
||||||
@ -331,9 +329,6 @@ vc_getrels(NameData *VacRelP)
|
|||||||
|
|
||||||
cur->vrl_relid = tuple->t_oid;
|
cur->vrl_relid = tuple->t_oid;
|
||||||
cur->vrl_next = (VRelList) NULL;
|
cur->vrl_next = (VRelList) NULL;
|
||||||
|
|
||||||
test(tuple->t_oid);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (found == false)
|
if (found == false)
|
||||||
elog(NOTICE, "Vacuum: table not found");
|
elog(NOTICE, "Vacuum: table not found");
|
||||||
@ -2250,29 +2245,3 @@ vc_enough_space(VPageDescr vpd, Size len)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
} /* vc_enough_space */
|
} /* vc_enough_space */
|
||||||
|
|
||||||
|
|
||||||
void test(Oid relid)
|
|
||||||
{
|
|
||||||
Relation rd;
|
|
||||||
HeapTuple rtup,
|
|
||||||
ctup;
|
|
||||||
Buffer buffer;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* update number of tuples and number of pages in pg_class
|
|
||||||
*/
|
|
||||||
ctup = SearchSysCacheTupleCopy(RELOID,
|
|
||||||
ObjectIdGetDatum(relid),
|
|
||||||
0, 0, 0);
|
|
||||||
if (!HeapTupleIsValid(ctup))
|
|
||||||
elog(ERROR, "pg_class entry for relid %d vanished during vacuuming",
|
|
||||||
relid);
|
|
||||||
|
|
||||||
rd = heap_openr(RelationRelationName);
|
|
||||||
|
|
||||||
/* get the buffer cache tuple */
|
|
||||||
rtup = heap_fetch(rd, SnapshotNow, &ctup->t_ctid, &buffer);
|
|
||||||
pfree(ctup);
|
|
||||||
heap_close(rd);
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user