diff options
Diffstat (limited to 'src/backend/commands/vacuum.c')
-rw-r--r-- | src/backend/commands/vacuum.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 8e141133a42..9a9d90fa2cf 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -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); |