PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
sinvaladt.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * sinvaladt.h
4  * POSTGRES shared cache invalidation data manager.
5  *
6  * The shared cache invalidation manager is responsible for transmitting
7  * invalidation messages between backends. Any message sent by any backend
8  * must be delivered to all already-running backends before it can be
9  * forgotten. (If we run out of space, we instead deliver a "RESET"
10  * message to backends that have fallen too far behind.)
11  *
12  * The struct type SharedInvalidationMessage, defining the contents of
13  * a single message, is defined in sinval.h.
14  *
15  * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
16  * Portions Copyright (c) 1994, Regents of the University of California
17  *
18  * src/include/storage/sinvaladt.h
19  *
20  *-------------------------------------------------------------------------
21  */
22 #ifndef SINVALADT_H
23 #define SINVALADT_H
24 
25 #include "storage/lock.h"
26 #include "storage/sinval.h"
27 
28 /*
29  * prototypes for functions in sinvaladt.c
30  */
31 extern Size SInvalShmemSize(void);
32 extern void CreateSharedInvalidationState(void);
33 extern void SharedInvalBackendInit(bool sendOnly);
34 extern PGPROC *BackendIdGetProc(int backendID);
35 extern void BackendIdGetTransactionIds(int backendID, TransactionId *xid, TransactionId *xmin);
36 
37 extern void SIInsertDataEntries(const SharedInvalidationMessage *data, int n);
38 extern int SIGetDataEntries(SharedInvalidationMessage *data, int datasize);
39 extern void SICleanupQueue(bool callerHasWriteLock, int minFree);
40 
42 
43 #endif /* SINVALADT_H */
uint32 TransactionId
Definition: c.h:397
PGPROC * BackendIdGetProc(int backendID)
Definition: sinvaladt.c:377
Size SInvalShmemSize(void)
Definition: sinvaladt.c:204
void SICleanupQueue(bool callerHasWriteLock, int minFree)
Definition: sinvaladt.c:643
void CreateSharedInvalidationState(void)
Definition: sinvaladt.c:219
void BackendIdGetTransactionIds(int backendID, TransactionId *xid, TransactionId *xmin)
Definition: sinvaladt.c:404
int SIGetDataEntries(SharedInvalidationMessage *data, int datasize)
Definition: sinvaladt.c:539
LocalTransactionId GetNextLocalTransactionId(void)
Definition: sinvaladt.c:769
uint32 LocalTransactionId
Definition: c.h:399
void SharedInvalBackendInit(bool sendOnly)
Definition: sinvaladt.c:258
size_t Size
Definition: c.h:356
void SIInsertDataEntries(const SharedInvalidationMessage *data, int n)
Definition: sinvaladt.c:436
Definition: proc.h:94