]> granicus.if.org Git - postgresql/commit
Modify RelationFlushRelation so that if the relcache entry
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Sep 1999 18:42:15 +0000 (18:42 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 4 Sep 1999 18:42:15 +0000 (18:42 +0000)
commitb4a607c9e0538a3047d156404cf48de7ea878b0b
tree853b70ac122b5ee79233e9fbb64fd3bd46ecf728
parent8add6d71cff28d087872215b02c7a0b84ba786c4
Modify RelationFlushRelation so that if the relcache entry
has positive refcount, it is rebuilt from pg_class data.  This ensures
that relcache entries will track changes made by other backends.  Formerly,
a shared inval report would just be ignored if it happened to arrive while
the relcache entry was in use.  Also, fix relcache to reset ref counts
to zero during transaction abort.  Finally, change LockRelation() so that
it checks for shared inval reports after obtaining the lock.  In this way,
once any kind of lock has been obtained on a rel, we can trust the relcache
entry to be up-to-date.
src/backend/access/transam/xact.c
src/backend/storage/lmgr/lmgr.c
src/backend/utils/cache/relcache.c
src/include/utils/relcache.h