postgresql/src/include/utils/inval.h
Tom Lane bbbc00af88 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.
2001-06-19 19:42:16 +00:00

30 lines
843 B
C

/*-------------------------------------------------------------------------
*
* inval.h
* POSTGRES cache invalidation dispatcher definitions.
*
*
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: inval.h,v 1.20 2001/06/19 19:42:16 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef INVAL_H
#define INVAL_H
#include "access/htup.h"
extern void AcceptInvalidationMessages(void);
extern void AtEOXactInvalidationMessages(bool isCommit);
extern void CommandEndInvalidationMessages(bool isCommit);
extern void RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple);
extern void RelationMark4RollbackHeapTuple(Relation relation, HeapTuple tuple);
#endif /* INVAL_H */