00001 /*------------------------------------------------------------------------- 00002 * 00003 * sinvaladt.h 00004 * POSTGRES shared cache invalidation data manager. 00005 * 00006 * The shared cache invalidation manager is responsible for transmitting 00007 * invalidation messages between backends. Any message sent by any backend 00008 * must be delivered to all already-running backends before it can be 00009 * forgotten. (If we run out of space, we instead deliver a "RESET" 00010 * message to backends that have fallen too far behind.) 00011 * 00012 * The struct type SharedInvalidationMessage, defining the contents of 00013 * a single message, is defined in sinval.h. 00014 * 00015 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group 00016 * Portions Copyright (c) 1994, Regents of the University of California 00017 * 00018 * src/include/storage/sinvaladt.h 00019 * 00020 *------------------------------------------------------------------------- 00021 */ 00022 #ifndef SINVALADT_H 00023 #define SINVALADT_H 00024 00025 #include "storage/lock.h" 00026 #include "storage/sinval.h" 00027 00028 /* 00029 * prototypes for functions in sinvaladt.c 00030 */ 00031 extern Size SInvalShmemSize(void); 00032 extern void CreateSharedInvalidationState(void); 00033 extern void SharedInvalBackendInit(bool sendOnly); 00034 extern PGPROC *BackendIdGetProc(int backendID); 00035 00036 extern void SIInsertDataEntries(const SharedInvalidationMessage *data, int n); 00037 extern int SIGetDataEntries(SharedInvalidationMessage *data, int datasize); 00038 extern void SICleanupQueue(bool callerHasWriteLock, int minFree); 00039 00040 extern LocalTransactionId GetNextLocalTransactionId(void); 00041 00042 #endif /* SINVALADT_H */