mirror of
https://github.com/postgres/postgres.git
synced 2025-10-19 15:49:24 +03:00
Make OIDs optional, per discussions in pghackers. WITH OIDS is still the
default, but OIDS are removed from many system catalogs that don't need them. Some interesting side effects: TOAST pointers are 20 bytes not 32 now; pg_description has a three-column key instead of one. Bugs fixed in passing: BINARY cursors work again; pg_class.relhaspkey has some usefulness; pg_dump dumps comments on indexes, rules, and triggers in a valid order. initdb forced.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.206 2001/07/18 00:46:24 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.207 2001/08/10 18:57:35 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -434,6 +434,12 @@ vac_update_relstats(Oid relid, BlockNumber num_pages, double num_tuples,
|
||||
pgcform->relpages = (int32) num_pages;
|
||||
pgcform->reltuples = num_tuples;
|
||||
pgcform->relhasindex = hasindex;
|
||||
/*
|
||||
* If we have discovered that there are no indexes, then there's
|
||||
* no primary key either. This could be done more thoroughly...
|
||||
*/
|
||||
if (!hasindex)
|
||||
pgcform->relhaspkey = false;
|
||||
|
||||
/* invalidate the tuple in the cache and write the buffer */
|
||||
RelationInvalidateHeapTuple(rd, &rtup);
|
||||
@@ -904,7 +910,8 @@ scan_heap(VRelStats *vacrelstats, Relation onerel,
|
||||
/*
|
||||
* Other checks...
|
||||
*/
|
||||
if (!OidIsValid(tuple.t_data->t_oid))
|
||||
if (!OidIsValid(tuple.t_data->t_oid) &&
|
||||
onerel->rd_rel->relhasoids)
|
||||
elog(NOTICE, "Rel %s: TID %u/%u: OID IS INVALID. TUPGONE %d.",
|
||||
relname, blkno, offnum, (int) tupgone);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user