From bbbc00af8829ea442ea9b8a43bdf751f0568bc92 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 19 Jun 2001 19:42:16 +0000 Subject: Clean up some longstanding problems in shared-cache invalidation. SI messages now include the relevant database OID, so that operations in one database do not cause useless cache flushes in backends attached to other databases. Declare SI messages properly using a union, to eliminate the former assumption that Oid is the same size as int or Index. Rewrite the nearly-unreadable code in inval.c, and document it better. Arrange for catcache flushes at end of command/transaction to happen before relcache flushes do --- this avoids loading a new tuple into the catcache while setting up new relcache entry, only to have it be flushed again immediately. --- src/include/utils/inval.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/include/utils/inval.h') diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h index 7da14e5172..d6277e27e1 100644 --- a/src/include/utils/inval.h +++ b/src/include/utils/inval.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: inval.h,v 1.19 2001/01/24 19:43:28 momjian Exp $ + * $Id: inval.h,v 1.20 2001/06/19 19:42:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -16,11 +16,12 @@ #include "access/htup.h" -extern void DiscardInvalid(void); -extern void RegisterInvalid(bool send); +extern void AcceptInvalidationMessages(void); -extern void ImmediateLocalInvalidation(bool send); +extern void AtEOXactInvalidationMessages(bool isCommit); + +extern void CommandEndInvalidationMessages(bool isCommit); extern void RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple); -- cgit v1.2.1