diff options
Diffstat (limited to 'src/backend/utils/cache/relcache.c')
-rw-r--r-- | src/backend/utils/cache/relcache.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index ba09331aba9..e71416c0f70 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.301 2010/02/03 01:14:17 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/cache/relcache.c,v 1.302 2010/02/04 00:09:14 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1925,13 +1925,13 @@ RelationClearRelation(Relation relation, bool rebuild) * new entry, and this shouldn't happen often enough for that to be * a big problem. * - * When rebuilding an open relcache entry, we must preserve ref count - * and rd_createSubid/rd_newRelfilenodeSubid state. Also attempt to - * preserve the pg_class entry (rd_rel), tupledesc, and rewrite-rule - * substructures in place, because various places assume that these - * structures won't move while they are working with an open relcache - * entry. (Note: the refcount mechanism for tupledescs might someday - * allow us to remove this hack for the tupledesc.) + * When rebuilding an open relcache entry, we must preserve ref count, + * rd_createSubid/rd_newRelfilenodeSubid, and rd_toastoid state. Also + * attempt to preserve the pg_class entry (rd_rel), tupledesc, and + * rewrite-rule substructures in place, because various places assume + * that these structures won't move while they are working with an + * open relcache entry. (Note: the refcount mechanism for tupledescs + * might someday allow us to remove this hack for the tupledesc.) * * Note that this process does not touch CurrentResourceOwner; which * is good because whatever ref counts the entry may have do not @@ -2005,6 +2005,8 @@ RelationClearRelation(Relation relation, bool rebuild) SWAPFIELD(RuleLock *, rd_rules); SWAPFIELD(MemoryContext, rd_rulescxt); } + /* toast OID override must be preserved */ + SWAPFIELD(Oid, rd_toastoid); /* pgstat_info must be preserved */ SWAPFIELD(struct PgStat_TableStatus *, pgstat_info); |