codekingpro/portable-devtools
116k
1/*-------------------------------------------------------------------------2 *3 * buf.h4 * Basic buffer manager data types.5 *6 *7 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group8 * Portions Copyright (c) 1994, Regents of the University of California9 *10 * src/include/storage/buf.h11 *12 *-------------------------------------------------------------------------13 */14#ifndef BUF_H15#define BUF_H16 17/*18 * Buffer identifiers.19 *20 * Zero is invalid, positive is the index of a shared buffer (1..NBuffers),21 * negative is the index of a local buffer (-1 .. -NLocBuffer).22 */23typedef int Buffer;24 25#define InvalidBuffer 026 27/*28 * BufferIsInvalid29 * True iff the buffer is invalid.30 */31#define BufferIsInvalid(buffer) ((buffer) == InvalidBuffer)32 33/*34 * BufferIsLocal35 * True iff the buffer is local (not visible to other backends).36 */37#define BufferIsLocal(buffer) ((buffer) < 0)38 39/*40 * Buffer access strategy objects.41 *42 * BufferAccessStrategyData is private to freelist.c43 */44typedef struct BufferAccessStrategyData *BufferAccessStrategy;45 46#endif /* BUF_H */47 