diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-09-04 18:42:15 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-09-04 18:42:15 +0000 |
commit | b4a607c9e0538a3047d156404cf48de7ea878b0b (patch) | |
tree | 853b70ac122b5ee79233e9fbb64fd3bd46ecf728 /src/include/utils/relcache.h | |
parent | 8add6d71cff28d087872215b02c7a0b84ba786c4 (diff) | |
download | postgresql-b4a607c9e0538a3047d156404cf48de7ea878b0b.tar.gz postgresql-b4a607c9e0538a3047d156404cf48de7ea878b0b.zip |
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.
Diffstat (limited to 'src/include/utils/relcache.h')
-rw-r--r-- | src/include/utils/relcache.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index cc9ed9e64c1..ad96a0fa9ad 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: relcache.h,v 1.13 1999/07/15 23:04:23 momjian Exp $ + * $Id: relcache.h,v 1.14 1999/09/04 18:42:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -34,6 +34,8 @@ extern void RelationRegisterRelation(Relation relation); extern void RelationPurgeLocalRelation(bool xactComitted); extern void RelationInitialize(void); +extern void RelationCacheAbort(void); + /* * both vacuum.c and relcache.c need to know the name of the relcache init file */ |