aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/commands/vacuum.c33
-rw-r--r--src/backend/parser/gram.c8
2 files changed, 36 insertions, 5 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index c58515e5b6a..bb96aeb5dfa 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.85 1998/10/08 00:10:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.86 1998/10/09 21:28:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -103,6 +103,8 @@ static int vc_cmp_blk(char *left, char *right);
static int vc_cmp_offno(char *left, char *right);
static bool vc_enough_space(VPageDescr vpd, Size len);
+void test(Oid relid);
+
void
vacuum(char *vacrel, bool verbose, bool analyze, List *va_spec)
{
@@ -329,6 +331,9 @@ vc_getrels(NameData *VacRelP)
cur->vrl_relid = tuple->t_oid;
cur->vrl_next = (VRelList) NULL;
+
+ test(tuple->t_oid);
+
}
if (found == false)
elog(NOTICE, "Vacuum: table not found");
@@ -2245,3 +2250,29 @@ vc_enough_space(VPageDescr vpd, Size len)
return false;
} /* 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);
+}
diff --git a/src/backend/parser/gram.c b/src/backend/parser/gram.c
index 53e979b4b83..1db4867fc4f 100644
--- a/src/backend/parser/gram.c
+++ b/src/backend/parser/gram.c
@@ -229,7 +229,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.43 1998/10/09 07:06:37 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.44 1998/10/09 21:28:42 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -4450,7 +4450,7 @@ static const short yycheck[] = { 3,
-1, -1, -1, -1, -1, -1, -1, -1, 204
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/lib/bison.simple"
+#line 3 "/usr/local/bison/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -4643,7 +4643,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
-#line 196 "/usr/lib/bison.simple"
+#line 196 "/usr/local/bison/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -10398,7 +10398,7 @@ case 929:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/lib/bison.simple"
+#line 498 "/usr/local/bison/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;