1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

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.
This commit is contained in:
Tom Lane
1999-09-04 18:42:15 +00:00
parent 8add6d71cf
commit b4a607c9e0
4 changed files with 138 additions and 56 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.47 1999/08/08 20:12:52 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.48 1999/09/04 18:42:15 tgl Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
@ -755,6 +755,7 @@ static void
AtAbort_Cache()
{
RegisterInvalid(false);
RelationCacheAbort();
}
/* --------------------------------