PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
bufmgr.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * bufmgr.h
4 * POSTGRES buffer manager definitions.
5 *
6 *
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
9 *
10 * src/include/storage/bufmgr.h
11 *
12 *-------------------------------------------------------------------------
13 */
14#ifndef BUFMGR_H
15#define BUFMGR_H
16
17#include "port/pg_iovec.h"
18#include "storage/aio_types.h"
19#include "storage/block.h"
20#include "storage/buf.h"
21#include "storage/bufpage.h"
23#include "utils/relcache.h"
24#include "utils/snapmgr.h"
25
26typedef void *Block;
27
28/*
29 * Possible arguments for GetAccessStrategy().
30 *
31 * If adding a new BufferAccessStrategyType, also add a new IOContext so
32 * IO statistics using this strategy are tracked.
33 */
35{
36 BAS_NORMAL, /* Normal random access */
37 BAS_BULKREAD, /* Large read-only scan (hint bit updates are
38 * ok) */
39 BAS_BULKWRITE, /* Large multi-block write (e.g. COPY IN) */
40 BAS_VACUUM, /* VACUUM */
42
43/* Possible modes for ReadBufferExtended() */
44typedef enum
45{
46 RBM_NORMAL, /* Normal read */
47 RBM_ZERO_AND_LOCK, /* Don't read from disk, caller will
48 * initialize. Also locks the page. */
49 RBM_ZERO_AND_CLEANUP_LOCK, /* Like RBM_ZERO_AND_LOCK, but locks the page
50 * in "cleanup" mode */
51 RBM_ZERO_ON_ERROR, /* Read, but return an all-zeros page on error */
52 RBM_NORMAL_NO_LOG, /* Don't log page as invalid during WAL
53 * replay; otherwise same as RBM_NORMAL */
55
56/*
57 * Type returned by PrefetchBuffer().
58 */
60{
61 Buffer recent_buffer; /* If valid, a hit (recheck needed!) */
62 bool initiated_io; /* If true, a miss resulting in async I/O */
64
65/*
66 * Flags influencing the behaviour of ExtendBufferedRel*
67 */
69{
70 /*
71 * Don't acquire extension lock. This is safe only if the relation isn't
72 * shared, an access exclusive lock is held or if this is the startup
73 * process.
74 */
76
77 /* Is this extension part of recovery? */
79
80 /*
81 * Should the fork be created if it does not currently exist? This likely
82 * only ever makes sense for relation forks.
83 */
85
86 /* Should the first (possibly only) return buffer be returned locked? */
87 EB_LOCK_FIRST = (1 << 3),
88
89 /* Should the smgr size cache be cleared? */
91
92 /* internal flags follow */
93 EB_LOCK_TARGET = (1 << 5),
95
96/*
97 * Some functions identify relations either by relation or smgr +
98 * relpersistence. Used via the BMR_REL()/BMR_SMGR() macros below. This
99 * allows us to use the same function for both recovery and normal operation.
100 */
102{
107
108#define BMR_REL(p_rel) ((BufferManagerRelation){.rel = p_rel})
109#define BMR_SMGR(p_smgr, p_relpersistence) ((BufferManagerRelation){.smgr = p_smgr, .relpersistence = p_relpersistence})
110
111/* Zero out page if reading fails. */
112#define READ_BUFFERS_ZERO_ON_ERROR (1 << 0)
113/* Call smgrprefetch() if I/O necessary. */
114#define READ_BUFFERS_ISSUE_ADVICE (1 << 1)
115/* Don't treat page as invalid due to checksum failures. */
116#define READ_BUFFERS_IGNORE_CHECKSUM_FAILURES (1 << 2)
117/* IO will immediately be waited for */
118#define READ_BUFFERS_SYNCHRONOUSLY (1 << 3)
119
120
122{
123 /* The following members should be set by the caller. */
124 Relation rel; /* optional */
129
130 /*
131 * The following private members are private state for communication
132 * between StartReadBuffers() and WaitReadBuffers(), initialized only if
133 * an actual read is required, and should not be modified.
134 */
137 int flags;
142};
143
145
146/* forward declared, to avoid having to expose buf_internals.h here */
147struct WritebackContext;
148
149/* forward declared, to avoid including smgr.h here */
150struct SMgrRelationData;
151
152/* in globals.c ... this duplicates miscadmin.h */
153extern PGDLLIMPORT int NBuffers;
154
155/* in bufmgr.c */
159extern PGDLLIMPORT bool track_io_timing;
160
161#define DEFAULT_EFFECTIVE_IO_CONCURRENCY 16
162#define DEFAULT_MAINTENANCE_IO_CONCURRENCY 16
165
166#define MAX_IO_COMBINE_LIMIT PG_IOV_MAX
167#define DEFAULT_IO_COMBINE_LIMIT Min(MAX_IO_COMBINE_LIMIT, (128 * 1024) / BLCKSZ)
168extern PGDLLIMPORT int io_combine_limit; /* min of the two GUCs below */
171
175
178
179/* in buf_init.c */
180extern PGDLLIMPORT char *BufferBlocks;
181
182/* in localbuf.c */
183extern PGDLLIMPORT int NLocBuffer;
186
187/* upper limit for effective_io_concurrency */
188#define MAX_IO_CONCURRENCY 1000
189
190/* special block number for ReadBuffer() */
191#define P_NEW InvalidBlockNumber /* grow the file to get a new page */
192
193/*
194 * Buffer content lock modes (mode argument for LockBuffer())
195 */
196#define BUFFER_LOCK_UNLOCK 0
197#define BUFFER_LOCK_SHARE 1
198#define BUFFER_LOCK_EXCLUSIVE 2
199
200
201/*
202 * prototypes for functions in bufmgr.c
203 */
205 ForkNumber forkNum,
206 BlockNumber blockNum);
208 BlockNumber blockNum);
209extern bool ReadRecentBuffer(RelFileLocator rlocator, ForkNumber forkNum,
210 BlockNumber blockNum, Buffer recent_buffer);
211extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum);
212extern Buffer ReadBufferExtended(Relation reln, ForkNumber forkNum,
214 BufferAccessStrategy strategy);
216 ForkNumber forkNum, BlockNumber blockNum,
218 bool permanent);
219
220extern bool StartReadBuffer(ReadBuffersOperation *operation,
221 Buffer *buffer,
222 BlockNumber blocknum,
223 int flags);
224extern bool StartReadBuffers(ReadBuffersOperation *operation,
225 Buffer *buffers,
226 BlockNumber blockNum,
227 int *nblocks,
228 int flags);
229extern void WaitReadBuffers(ReadBuffersOperation *operation);
230
231extern void ReleaseBuffer(Buffer buffer);
232extern void UnlockReleaseBuffer(Buffer buffer);
233extern bool BufferIsExclusiveLocked(Buffer buffer);
234extern bool BufferIsDirty(Buffer buffer);
235extern void MarkBufferDirty(Buffer buffer);
236extern void IncrBufferRefCount(Buffer buffer);
237extern void CheckBufferIsPinnedOnce(Buffer buffer);
238extern Buffer ReleaseAndReadBuffer(Buffer buffer, Relation relation,
239 BlockNumber blockNum);
240
242 ForkNumber forkNum,
243 BufferAccessStrategy strategy,
244 uint32 flags);
246 ForkNumber fork,
247 BufferAccessStrategy strategy,
248 uint32 flags,
249 uint32 extend_by,
250 Buffer *buffers,
251 uint32 *extended_by);
253 ForkNumber fork,
254 BufferAccessStrategy strategy,
255 uint32 flags,
256 BlockNumber extend_to,
258
259extern void InitBufferManagerAccess(void);
260extern void AtEOXact_Buffers(bool isCommit);
261#ifdef USE_ASSERT_CHECKING
262extern void AssertBufferLocksPermitCatalogRead(void);
263#endif
264extern char *DebugPrintBufferRefcount(Buffer buffer);
265extern void CheckPointBuffers(int flags);
268 ForkNumber forkNum);
269extern void FlushOneBuffer(Buffer buffer);
270extern void FlushRelationBuffers(Relation rel);
271extern void FlushRelationsAllBuffers(struct SMgrRelationData **smgrs, int nrels);
272extern void CreateAndCopyRelationData(RelFileLocator src_rlocator,
273 RelFileLocator dst_rlocator,
274 bool permanent);
275extern void FlushDatabaseBuffers(Oid dbid);
276extern void DropRelationBuffers(struct SMgrRelationData *smgr_reln,
277 ForkNumber *forkNum,
278 int nforks, BlockNumber *firstDelBlock);
279extern void DropRelationsAllBuffers(struct SMgrRelationData **smgr_reln,
280 int nlocators);
281extern void DropDatabaseBuffers(Oid dbid);
282
283#define RelationGetNumberOfBlocks(reln) \
284 RelationGetNumberOfBlocksInFork(reln, MAIN_FORKNUM)
285
286extern bool BufferIsPermanent(Buffer buffer);
288extern void BufferGetTag(Buffer buffer, RelFileLocator *rlocator,
289 ForkNumber *forknum, BlockNumber *blknum);
290
291extern void MarkBufferDirtyHint(Buffer buffer, bool buffer_std);
292
293extern void UnlockBuffers(void);
294extern void LockBuffer(Buffer buffer, int mode);
295extern bool ConditionalLockBuffer(Buffer buffer);
296extern void LockBufferForCleanup(Buffer buffer);
297extern bool ConditionalLockBufferForCleanup(Buffer buffer);
298extern bool IsBufferCleanupOK(Buffer buffer);
299extern bool HoldingBufferPinThatDelaysRecovery(void);
300
301extern bool BgBufferSync(struct WritebackContext *wb_context);
302
303extern uint32 GetPinLimit(void);
304extern uint32 GetLocalPinLimit(void);
305extern uint32 GetAdditionalPinLimit(void);
307extern void LimitAdditionalPins(uint32 *additional_pins);
308extern void LimitAdditionalLocalPins(uint32 *additional_pins);
309
310extern bool EvictUnpinnedBuffer(Buffer buf, bool *buffer_flushed);
311extern void EvictAllUnpinnedBuffers(int32 *buffers_evicted,
312 int32 *buffers_flushed,
313 int32 *buffers_skipped);
314extern void EvictRelUnpinnedBuffers(Relation rel,
315 int32 *buffers_evicted,
316 int32 *buffers_flushed,
317 int32 *buffers_skipped);
318
319/* in buf_init.c */
320extern void BufferManagerShmemInit(void);
321extern Size BufferManagerShmemSize(void);
322
323/* in localbuf.c */
324extern void AtProcExit_LocalBuffers(void);
325
326/* in freelist.c */
327
330 int ring_size_kb);
333
334extern void FreeAccessStrategy(BufferAccessStrategy strategy);
335
336
337/* inline functions */
338
339/*
340 * Although this header file is nominally backend-only, certain frontend
341 * programs like pg_waldump include it. For compilers that emit static
342 * inline functions even when they're unused, that leads to unsatisfied
343 * external references; hence hide these with #ifndef FRONTEND.
344 */
345
346#ifndef FRONTEND
347
348/*
349 * BufferIsValid
350 * True iff the given buffer number is valid (either as a shared
351 * or local buffer).
352 *
353 * Note: For a long time this was defined the same as BufferIsPinned,
354 * that is it would say False if you didn't hold a pin on the buffer.
355 * I believe this was bogus and served only to mask logic errors.
356 * Code should always know whether it has a buffer reference,
357 * independently of the pin state.
358 *
359 * Note: For a further long time this was not quite the inverse of the
360 * BufferIsInvalid() macro, in that it also did sanity checks to verify
361 * that the buffer number was in range. Most likely, this macro was
362 * originally intended only to be used in assertions, but its use has
363 * since expanded quite a bit, and the overhead of making those checks
364 * even in non-assert-enabled builds can be significant. Thus, we've
365 * now demoted the range checks to assertions within the macro itself.
366 */
367static inline bool
369{
370 Assert(bufnum <= NBuffers);
371 Assert(bufnum >= -NLocBuffer);
372
373 return bufnum != InvalidBuffer;
374}
375
376/*
377 * BufferGetBlock
378 * Returns a reference to a disk page image associated with a buffer.
379 *
380 * Note:
381 * Assumes buffer is valid.
382 */
383static inline Block
385{
386 Assert(BufferIsValid(buffer));
387
388 if (BufferIsLocal(buffer))
389 return LocalBufferBlockPointers[-buffer - 1];
390 else
391 return (Block) (BufferBlocks + ((Size) (buffer - 1)) * BLCKSZ);
392}
393
394/*
395 * BufferGetPageSize
396 * Returns the page size within a buffer.
397 *
398 * Notes:
399 * Assumes buffer is valid.
400 *
401 * The buffer can be a raw disk block and need not contain a valid
402 * (formatted) disk page.
403 */
404/* XXX should dig out of buffer descriptor */
405static inline Size
407{
408 Assert(BufferIsValid(buffer));
409 return (Size) BLCKSZ;
410}
411
412/*
413 * BufferGetPage
414 * Returns the page associated with a buffer.
415 */
416static inline Page
418{
419 return (Page) BufferGetBlock(buffer);
420}
421
422#endif /* FRONTEND */
423
424#endif /* BUFMGR_H */
uint32 BlockNumber
Definition: block.h:31
int Buffer
Definition: buf.h:23
#define InvalidBuffer
Definition: buf.h:25
#define BufferIsLocal(buffer)
Definition: buf.h:37
BufferAccessStrategyType
Definition: bufmgr.h:35
@ BAS_BULKREAD
Definition: bufmgr.h:37
@ BAS_NORMAL
Definition: bufmgr.h:36
@ BAS_VACUUM
Definition: bufmgr.h:40
@ BAS_BULKWRITE
Definition: bufmgr.h:39
void CheckBufferIsPinnedOnce(Buffer buffer)
Definition: bufmgr.c:5654
struct BufferManagerRelation BufferManagerRelation
void IncrBufferRefCount(Buffer buffer)
Definition: bufmgr.c:5405
void DropDatabaseBuffers(Oid dbid)
Definition: bufmgr.c:4895
bool BgBufferSync(struct WritebackContext *wb_context)
Definition: bufmgr.c:3625
PGDLLIMPORT int effective_io_concurrency
Definition: bufmgr.c:155
bool BufferIsExclusiveLocked(Buffer buffer)
Definition: bufmgr.c:2891
BlockNumber BufferGetBlockNumber(Buffer buffer)
Definition: bufmgr.c:4231
PGDLLIMPORT const PgAioHandleCallbacks aio_shared_buffer_readv_cb
Definition: bufmgr.c:7437
void DropRelationBuffers(struct SMgrRelationData *smgr_reln, ForkNumber *forkNum, int nforks, BlockNumber *firstDelBlock)
Buffer ReleaseAndReadBuffer(Buffer buffer, Relation relation, BlockNumber blockNum)
Definition: bufmgr.c:3014
PrefetchBufferResult PrefetchBuffer(Relation reln, ForkNumber forkNum, BlockNumber blockNum)
Definition: bufmgr.c:651
int GetAccessStrategyPinLimit(BufferAccessStrategy strategy)
Definition: freelist.c:689
bool StartReadBuffers(ReadBuffersOperation *operation, Buffer *buffers, BlockNumber blockNum, int *nblocks, int flags)
Definition: bufmgr.c:1494
void EvictAllUnpinnedBuffers(int32 *buffers_evicted, int32 *buffers_flushed, int32 *buffers_skipped)
Definition: bufmgr.c:6680
PGDLLIMPORT int bgwriter_flush_after
Definition: bufmgr.c:179
PGDLLIMPORT const PgAioHandleCallbacks aio_local_buffer_readv_cb
Definition: bufmgr.c:7446
void EvictRelUnpinnedBuffers(Relation rel, int32 *buffers_evicted, int32 *buffers_flushed, int32 *buffers_skipped)
Definition: bufmgr.c:6728
PGDLLIMPORT bool zero_damaged_pages
Definition: bufmgr.c:144
PGDLLIMPORT Block * LocalBufferBlockPointers
Definition: localbuf.c:47
bool IsBufferCleanupOK(Buffer buffer)
Definition: bufmgr.c:5913
PGDLLIMPORT int bgwriter_lru_maxpages
Definition: bufmgr.c:145
Buffer ExtendBufferedRel(BufferManagerRelation bmr, ForkNumber forkNum, BufferAccessStrategy strategy, uint32 flags)
Definition: bufmgr.c:858
uint32 GetAdditionalLocalPinLimit(void)
Definition: localbuf.c:314
static Page BufferGetPage(Buffer buffer)
Definition: bufmgr.h:417
void AtEOXact_Buffers(bool isCommit)
Definition: bufmgr.c:3996
BufferAccessStrategy GetAccessStrategy(BufferAccessStrategyType btype)
Definition: freelist.c:541
BlockNumber ExtendBufferedRelBy(BufferManagerRelation bmr, ForkNumber fork, BufferAccessStrategy strategy, uint32 flags, uint32 extend_by, Buffer *buffers, uint32 *extended_by)
Definition: bufmgr.c:890
struct PrefetchBufferResult PrefetchBufferResult
Size BufferManagerShmemSize(void)
Definition: buf_init.c:162
static Block BufferGetBlock(Buffer buffer)
Definition: bufmgr.h:384
void CreateAndCopyRelationData(RelFileLocator src_rlocator, RelFileLocator dst_rlocator, bool permanent)
Definition: bufmgr.c:5247
PGDLLIMPORT int maintenance_io_concurrency
Definition: bufmgr.c:162
Buffer ExtendBufferedRelTo(BufferManagerRelation bmr, ForkNumber fork, BufferAccessStrategy strategy, uint32 flags, BlockNumber extend_to, ReadBufferMode mode)
Definition: bufmgr.c:922
void AtProcExit_LocalBuffers(void)
Definition: localbuf.c:1004
PGDLLIMPORT bool track_io_timing
Definition: bufmgr.c:147
void BufferGetTag(Buffer buffer, RelFileLocator *rlocator, ForkNumber *forknum, BlockNumber *blknum)
Definition: bufmgr.c:4252
PGDLLIMPORT int NBuffers
Definition: globals.c:143
void LimitAdditionalLocalPins(uint32 *additional_pins)
Definition: localbuf.c:322
uint32 GetLocalPinLimit(void)
Definition: localbuf.c:306
BufferAccessStrategy GetAccessStrategyWithSize(BufferAccessStrategyType btype, int ring_size_kb)
Definition: freelist.c:626
char * DebugPrintBufferRefcount(Buffer buffer)
Definition: bufmgr.c:4174
void CheckPointBuffers(int flags)
Definition: bufmgr.c:4217
bool BufferIsDirty(Buffer buffer)
Definition: bufmgr.c:2919
void DropRelationsAllBuffers(struct SMgrRelationData **smgr_reln, int nlocators)
bool BufferIsPermanent(Buffer buffer)
Definition: bufmgr.c:4463
void UnlockBuffers(void)
Definition: bufmgr.c:5579
void * Block
Definition: bufmgr.h:26
PGDLLIMPORT int io_combine_limit_guc
Definition: bufmgr.c:171
int GetAccessStrategyBufferCount(BufferAccessStrategy strategy)
Definition: freelist.c:666
static Size BufferGetPageSize(Buffer buffer)
Definition: bufmgr.h:406
bool ConditionalLockBuffer(Buffer buffer)
Definition: bufmgr.c:5633
BlockNumber RelationGetNumberOfBlocksInFork(Relation relation, ForkNumber forkNum)
Definition: bufmgr.c:4431
void BufferManagerShmemInit(void)
Definition: buf_init.c:68
void ReleaseBuffer(Buffer buffer)
Definition: bufmgr.c:5373
void FreeAccessStrategy(BufferAccessStrategy strategy)
Definition: freelist.c:723
PGDLLIMPORT int32 * LocalRefCount
Definition: localbuf.c:48
XLogRecPtr BufferGetLSNAtomic(Buffer buffer)
Definition: bufmgr.c:4493
bool HoldingBufferPinThatDelaysRecovery(void)
Definition: bufmgr.c:5829
void UnlockReleaseBuffer(Buffer buffer)
Definition: bufmgr.c:5390
void WaitReadBuffers(ReadBuffersOperation *operation)
Definition: bufmgr.c:1637
PrefetchBufferResult PrefetchSharedBuffer(struct SMgrRelationData *smgr_reln, ForkNumber forkNum, BlockNumber blockNum)
void MarkBufferDirty(Buffer buffer)
Definition: bufmgr.c:2952
PGDLLIMPORT int io_combine_limit
Definition: bufmgr.c:170
void LimitAdditionalPins(uint32 *additional_pins)
Definition: bufmgr.c:2548
PGDLLIMPORT int NLocBuffer
Definition: localbuf.c:44
void LockBufferForCleanup(Buffer buffer)
Definition: bufmgr.c:5687
void LockBuffer(Buffer buffer, int mode)
Definition: bufmgr.c:5607
void MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
Definition: bufmgr.c:5437
void FlushRelationBuffers(Relation rel)
Definition: bufmgr.c:4943
ExtendBufferedFlags
Definition: bufmgr.h:69
@ EB_LOCK_TARGET
Definition: bufmgr.h:93
@ EB_CLEAR_SIZE_CACHE
Definition: bufmgr.h:90
@ EB_PERFORMING_RECOVERY
Definition: bufmgr.h:78
@ EB_CREATE_FORK_IF_NEEDED
Definition: bufmgr.h:84
@ EB_SKIP_EXTENSION_LOCK
Definition: bufmgr.h:75
@ EB_LOCK_FIRST
Definition: bufmgr.h:87
bool EvictUnpinnedBuffer(Buffer buf, bool *buffer_flushed)
Definition: bufmgr.c:6651
Buffer ReadBufferWithoutRelcache(RelFileLocator rlocator, ForkNumber forkNum, BlockNumber blockNum, ReadBufferMode mode, BufferAccessStrategy strategy, bool permanent)
Definition: bufmgr.c:842
PGDLLIMPORT int backend_flush_after
Definition: bufmgr.c:180
PGDLLIMPORT double bgwriter_lru_multiplier
Definition: bufmgr.c:146
bool ReadRecentBuffer(RelFileLocator rlocator, ForkNumber forkNum, BlockNumber blockNum, Buffer recent_buffer)
Definition: bufmgr.c:682
void FlushDatabaseBuffers(Oid dbid)
Definition: bufmgr.c:5311
void FlushRelationsAllBuffers(struct SMgrRelationData **smgrs, int nrels)
PGDLLIMPORT int checkpoint_flush_after
Definition: bufmgr.c:178
bool StartReadBuffer(ReadBuffersOperation *operation, Buffer *buffer, BlockNumber blocknum, int flags)
Definition: bufmgr.c:1513
Buffer ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum, ReadBufferMode mode, BufferAccessStrategy strategy)
Definition: bufmgr.c:805
void InitBufferManagerAccess(void)
Definition: bufmgr.c:4013
PGDLLIMPORT char * BufferBlocks
Definition: buf_init.c:22
uint32 GetAdditionalPinLimit(void)
Definition: bufmgr.c:2522
PGDLLIMPORT int io_max_combine_limit
Definition: bufmgr.c:172
Buffer ReadBuffer(Relation reln, BlockNumber blockNum)
Definition: bufmgr.c:758
ReadBufferMode
Definition: bufmgr.h:45
@ RBM_ZERO_ON_ERROR
Definition: bufmgr.h:51
@ RBM_ZERO_AND_CLEANUP_LOCK
Definition: bufmgr.h:49
@ RBM_ZERO_AND_LOCK
Definition: bufmgr.h:47
@ RBM_NORMAL
Definition: bufmgr.h:46
@ RBM_NORMAL_NO_LOG
Definition: bufmgr.h:52
bool ConditionalLockBufferForCleanup(Buffer buffer)
Definition: bufmgr.c:5855
uint32 GetPinLimit(void)
Definition: bufmgr.c:2510
void FlushOneBuffer(Buffer buffer)
Definition: bufmgr.c:5353
static bool BufferIsValid(Buffer bufnum)
Definition: bufmgr.h:368
PageData * Page
Definition: bufpage.h:82
#define PGDLLIMPORT
Definition: c.h:1291
int16_t int16
Definition: c.h:497
int32_t int32
Definition: c.h:498
uint32_t uint32
Definition: c.h:502
size_t Size
Definition: c.h:576
Assert(PointerIsAligned(start, uint64))
static PgChecksumMode mode
Definition: pg_checksums.c:55
static char * buf
Definition: pg_test_fsync.c:72
unsigned int Oid
Definition: postgres_ext.h:30
ForkNumber
Definition: relpath.h:56
struct SMgrRelationData * smgr
Definition: bufmgr.h:104
Buffer recent_buffer
Definition: bufmgr.h:61
ForkNumber forknum
Definition: bufmgr.h:127
PgAioWaitRef io_wref
Definition: bufmgr.h:140
Buffer * buffers
Definition: bufmgr.h:135
BufferAccessStrategy strategy
Definition: bufmgr.h:128
BlockNumber blocknum
Definition: bufmgr.h:136
PgAioReturn io_return
Definition: bufmgr.h:141
struct SMgrRelationData * smgr
Definition: bufmgr.h:125
uint64 XLogRecPtr
Definition: xlogdefs.h:21