PostgreSQL Source Code  git master
xloginsert.h File Reference
#include "access/rmgr.h"
#include "access/xlogdefs.h"
#include "storage/block.h"
#include "storage/buf.h"
#include "storage/relfilenode.h"
#include "utils/relcache.h"
Include dependency graph for xloginsert.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define XLR_NORMAL_MAX_BLOCK_ID   4
 
#define XLR_NORMAL_RDATAS   20
 
#define REGBUF_FORCE_IMAGE   0x01 /* force a full-page image */
 
#define REGBUF_NO_IMAGE   0x02 /* don't take a full-page image */
 
#define REGBUF_WILL_INIT
 
#define REGBUF_STANDARD
 
#define REGBUF_KEEP_DATA
 

Functions

void XLogBeginInsert (void)
 
void XLogSetRecordFlags (uint8 flags)
 
XLogRecPtr XLogInsert (RmgrId rmid, uint8 info)
 
void XLogEnsureRecordSpace (int max_block_id, int ndatas)
 
void XLogRegisterData (char *data, int len)
 
void XLogRegisterBuffer (uint8 block_id, Buffer buffer, uint8 flags)
 
void XLogRegisterBlock (uint8 block_id, RelFileNode *rnode, ForkNumber forknum, BlockNumber blknum, char *page, uint8 flags)
 
void XLogRegisterBufData (uint8 block_id, char *data, int len)
 
void XLogResetInsertion (void)
 
bool XLogCheckBufferNeedsBackup (Buffer buffer)
 
XLogRecPtr log_newpage (RelFileNode *rnode, ForkNumber forkNum, BlockNumber blk, char *page, bool page_std)
 
XLogRecPtr log_newpage_buffer (Buffer buffer, bool page_std)
 
void log_newpage_range (Relation rel, ForkNumber forkNum, BlockNumber startblk, BlockNumber endblk, bool page_std)
 
XLogRecPtr XLogSaveBufferForHint (Buffer buffer, bool buffer_std)
 
void InitXLogInsert (void)
 

Macro Definition Documentation

◆ REGBUF_FORCE_IMAGE

#define REGBUF_FORCE_IMAGE   0x01 /* force a full-page image */

◆ REGBUF_KEEP_DATA

#define REGBUF_KEEP_DATA
Value:
0x10 /* include data even if a full-page image
* is taken */

Definition at line 38 of file xloginsert.h.

Referenced by heap_insert(), heap_multi_insert(), log_heap_update(), and XLogRecordAssemble().

◆ REGBUF_NO_IMAGE

#define REGBUF_NO_IMAGE   0x02 /* don't take a full-page image */

◆ REGBUF_STANDARD

◆ REGBUF_WILL_INIT

◆ XLR_NORMAL_MAX_BLOCK_ID

#define XLR_NORMAL_MAX_BLOCK_ID   4

Definition at line 27 of file xloginsert.h.

Referenced by InitXLogInsert(), and XLogEnsureRecordSpace().

◆ XLR_NORMAL_RDATAS

#define XLR_NORMAL_RDATAS   20

Definition at line 28 of file xloginsert.h.

Referenced by InitXLogInsert(), and XLogEnsureRecordSpace().

Function Documentation

◆ InitXLogInsert()

void InitXLogInsert ( void  )

Definition at line 1121 of file xloginsert.c.

References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, hdr_scratch, HEADER_SCRATCH_SIZE, max_rdatas, max_registered_buffers, MemoryContextAlloc(), MemoryContextAllocZero(), TopMemoryContext, XLR_NORMAL_MAX_BLOCK_ID, and XLR_NORMAL_RDATAS.

Referenced by CreateCheckPoint(), and InitXLOGAccess().

1122 {
1123  /* Initialize the working areas */
1124  if (xloginsert_cxt == NULL)
1125  {
1127  "WAL record construction",
1129  }
1130 
1131  if (registered_buffers == NULL)
1132  {
1135  sizeof(registered_buffer) * (XLR_NORMAL_MAX_BLOCK_ID + 1));
1137  }
1138  if (rdatas == NULL)
1139  {
1141  sizeof(XLogRecData) * XLR_NORMAL_RDATAS);
1143  }
1144 
1145  /*
1146  * Allocate a buffer to hold the header information for a WAL record.
1147  */
1148  if (hdr_scratch == NULL)
1151 }
#define AllocSetContextCreate
Definition: memutils.h:170
#define HEADER_SCRATCH_SIZE
Definition: xloginsert.c:93
#define XLR_NORMAL_RDATAS
Definition: xloginsert.h:28
static int max_registered_buffers
Definition: xloginsert.c:65
#define ALLOCSET_DEFAULT_SIZES
Definition: memutils.h:192
static int max_rdatas
Definition: xloginsert.c:103
MemoryContext TopMemoryContext
Definition: mcxt.c:44
static registered_buffer * registered_buffers
Definition: xloginsert.c:64
void * MemoryContextAllocZero(MemoryContext context, Size size)
Definition: mcxt.c:839
#define XLR_NORMAL_MAX_BLOCK_ID
Definition: xloginsert.h:27
static char * hdr_scratch
Definition: xloginsert.c:89
void * MemoryContextAlloc(MemoryContext context, Size size)
Definition: mcxt.c:796
static MemoryContext xloginsert_cxt
Definition: xloginsert.c:108
static XLogRecData * rdatas
Definition: xloginsert.c:101

◆ log_newpage()

XLogRecPtr log_newpage ( RelFileNode rnode,
ForkNumber  forkNum,
BlockNumber  blk,
char *  page,
bool  page_std 
)

Definition at line 977 of file xloginsert.c.

References PageIsNew, PageSetLSN, REGBUF_FORCE_IMAGE, REGBUF_STANDARD, XLOG_FPI, XLogBeginInsert(), XLogInsert(), and XLogRegisterBlock().

Referenced by _bt_blwritepage(), _hash_alloc_buckets(), _hash_init(), blbuildempty(), btbuildempty(), end_heap_rewrite(), log_newpage_buffer(), raw_heap_insert(), RelationCopyStorage(), and spgbuildempty().

979 {
980  int flags;
981  XLogRecPtr recptr;
982 
983  flags = REGBUF_FORCE_IMAGE;
984  if (page_std)
985  flags |= REGBUF_STANDARD;
986 
987  XLogBeginInsert();
988  XLogRegisterBlock(0, rnode, forkNum, blkno, page, flags);
989  recptr = XLogInsert(RM_XLOG_ID, XLOG_FPI);
990 
991  /*
992  * The page may be uninitialized. If so, we can't set the LSN because that
993  * would corrupt the page.
994  */
995  if (!PageIsNew(page))
996  {
997  PageSetLSN(page, recptr);
998  }
999 
1000  return recptr;
1001 }
void XLogRegisterBlock(uint8 block_id, RelFileNode *rnode, ForkNumber forknum, BlockNumber blknum, Page page, uint8 flags)
Definition: xloginsert.c:267
#define REGBUF_STANDARD
Definition: xloginsert.h:35
#define REGBUF_FORCE_IMAGE
Definition: xloginsert.h:31
XLogRecPtr XLogInsert(RmgrId rmid, uint8 info)
Definition: xloginsert.c:416
uint64 XLogRecPtr
Definition: xlogdefs.h:21
#define XLOG_FPI
Definition: pg_control.h:78
#define PageIsNew(page)
Definition: bufpage.h:229
void XLogBeginInsert(void)
Definition: xloginsert.c:121
#define PageSetLSN(page, lsn)
Definition: bufpage.h:368

◆ log_newpage_buffer()

XLogRecPtr log_newpage_buffer ( Buffer  buffer,
bool  page_std 
)

Definition at line 1014 of file xloginsert.c.

References Assert, BufferGetPage, BufferGetTag(), CritSectionCount, and log_newpage().

Referenced by brin_initialize_empty_new_buffer(), brinbuildempty(), FreeSpaceMapPrepareTruncateRel(), ginbuildempty(), gistbuildempty(), lazy_scan_heap(), and visibilitymap_prepare_truncate().

1015 {
1016  Page page = BufferGetPage(buffer);
1017  RelFileNode rnode;
1018  ForkNumber forkNum;
1019  BlockNumber blkno;
1020 
1021  /* Shared buffers should be modified in a critical section. */
1022  Assert(CritSectionCount > 0);
1023 
1024  BufferGetTag(buffer, &rnode, &forkNum, &blkno);
1025 
1026  return log_newpage(&rnode, forkNum, blkno, page, page_std);
1027 }
uint32 BlockNumber
Definition: block.h:31
volatile uint32 CritSectionCount
Definition: globals.c:38
#define BufferGetPage(buffer)
Definition: bufmgr.h:160
ForkNumber
Definition: relpath.h:40
#define Assert(condition)
Definition: c.h:738
XLogRecPtr log_newpage(RelFileNode *rnode, ForkNumber forkNum, BlockNumber blkno, Page page, bool page_std)
Definition: xloginsert.c:977
void BufferGetTag(Buffer buffer, RelFileNode *rnode, ForkNumber *forknum, BlockNumber *blknum)
Definition: bufmgr.c:2605
Pointer Page
Definition: bufpage.h:78

◆ log_newpage_range()

void log_newpage_range ( Relation  rel,
ForkNumber  forkNum,
BlockNumber  startblk,
BlockNumber  endblk,
bool  page_std 
)

Definition at line 1047 of file xloginsert.c.

References buf, BUFFER_LOCK_EXCLUSIVE, BufferGetPage, CHECK_FOR_INTERRUPTS, END_CRIT_SECTION, i, LockBuffer(), MarkBufferDirty(), PageIsNew, PageSetLSN, RBM_NORMAL, ReadBufferExtended(), REGBUF_FORCE_IMAGE, REGBUF_STANDARD, START_CRIT_SECTION, UnlockReleaseBuffer(), XLOG_FPI, XLogBeginInsert(), XLogEnsureRecordSpace(), XLogInsert(), XLogRegisterBuffer(), and XLR_MAX_BLOCK_ID.

Referenced by ginbuild(), gistbuild(), smgrDoPendingSyncs(), and spgbuild().

1050 {
1051  int flags;
1052  BlockNumber blkno;
1053 
1054  flags = REGBUF_FORCE_IMAGE;
1055  if (page_std)
1056  flags |= REGBUF_STANDARD;
1057 
1058  /*
1059  * Iterate over all the pages in the range. They are collected into
1060  * batches of XLR_MAX_BLOCK_ID pages, and a single WAL-record is written
1061  * for each batch.
1062  */
1064 
1065  blkno = startblk;
1066  while (blkno < endblk)
1067  {
1068  Buffer bufpack[XLR_MAX_BLOCK_ID];
1069  XLogRecPtr recptr;
1070  int nbufs;
1071  int i;
1072 
1074 
1075  /* Collect a batch of blocks. */
1076  nbufs = 0;
1077  while (nbufs < XLR_MAX_BLOCK_ID && blkno < endblk)
1078  {
1079  Buffer buf = ReadBufferExtended(rel, forkNum, blkno,
1080  RBM_NORMAL, NULL);
1081 
1083 
1084  /*
1085  * Completely empty pages are not WAL-logged. Writing a WAL record
1086  * would change the LSN, and we don't want that. We want the page
1087  * to stay empty.
1088  */
1089  if (!PageIsNew(BufferGetPage(buf)))
1090  bufpack[nbufs++] = buf;
1091  else
1092  UnlockReleaseBuffer(buf);
1093  blkno++;
1094  }
1095 
1096  /* Write WAL record for this batch. */
1097  XLogBeginInsert();
1098 
1100  for (i = 0; i < nbufs; i++)
1101  {
1102  XLogRegisterBuffer(i, bufpack[i], flags);
1103  MarkBufferDirty(bufpack[i]);
1104  }
1105 
1106  recptr = XLogInsert(RM_XLOG_ID, XLOG_FPI);
1107 
1108  for (i = 0; i < nbufs; i++)
1109  {
1110  PageSetLSN(BufferGetPage(bufpack[i]), recptr);
1111  UnlockReleaseBuffer(bufpack[i]);
1112  }
1113  END_CRIT_SECTION();
1114  }
1115 }
void MarkBufferDirty(Buffer buffer)
Definition: bufmgr.c:1419
void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags)
Definition: xloginsert.c:214
Buffer ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum, ReadBufferMode mode, BufferAccessStrategy strategy)
Definition: bufmgr.c:603
#define END_CRIT_SECTION()
Definition: miscadmin.h:134
#define START_CRIT_SECTION()
Definition: miscadmin.h:132
uint32 BlockNumber
Definition: block.h:31
#define BUFFER_LOCK_EXCLUSIVE
Definition: bufmgr.h:89
void UnlockReleaseBuffer(Buffer buffer)
Definition: bufmgr.c:3457
static char * buf
Definition: pg_test_fsync.c:67
#define REGBUF_STANDARD
Definition: xloginsert.h:35
#define BufferGetPage(buffer)
Definition: bufmgr.h:160
#define XLR_MAX_BLOCK_ID
Definition: xlogrecord.h:221
#define REGBUF_FORCE_IMAGE
Definition: xloginsert.h:31
XLogRecPtr XLogInsert(RmgrId rmid, uint8 info)
Definition: xloginsert.c:416
void LockBuffer(Buffer buffer, int mode)
Definition: bufmgr.c:3673
uint64 XLogRecPtr
Definition: xlogdefs.h:21
void XLogEnsureRecordSpace(int max_block_id, int ndatas)
Definition: xloginsert.c:147
#define XLOG_FPI
Definition: pg_control.h:78
#define PageIsNew(page)
Definition: bufpage.h:229
int i
#define CHECK_FOR_INTERRUPTS()
Definition: miscadmin.h:99
void XLogBeginInsert(void)
Definition: xloginsert.c:121
#define PageSetLSN(page, lsn)
Definition: bufpage.h:368
int Buffer
Definition: buf.h:23

◆ XLogBeginInsert()

void XLogBeginInsert ( void  )

Definition at line 121 of file xloginsert.c.

References Assert, begininsert_called, elog, ERROR, mainrdata_len, max_registered_block_id, and XLogInsertAllowed().

Referenced by _bt_dedup_one_page(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_log_reuse_page(), _bt_mark_page_halfdead(), _bt_newroot(), _bt_split(), _bt_unlink_halfdead_page(), _bt_update_meta_cleanup_info(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), AssignTransactionId(), brin_doinsert(), brin_doupdate(), brinbuild(), brinRevmapDesummarizeRange(), CreateCheckPoint(), createdb(), CreateEndOfRecoveryRecord(), createPostingTree(), CreateTableSpace(), do_pg_stop_backup(), do_setval(), doPickSplit(), DropTableSpace(), EndPrepare(), ExecuteTruncateGuts(), fill_seq_with_data(), GenericXLogFinish(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginUpdateStats(), ginVacuumPostingTreeLeaf(), gistXLogAssignLSN(), gistXLogDelete(), gistXLogPageDelete(), gistXLogPageReuse(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_inplace_update(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_update(), log_heap_clean(), log_heap_cleanup_info(), log_heap_freeze(), log_heap_new_cid(), log_heap_update(), log_heap_visible(), log_newpage(), log_newpage_range(), log_smgrcreate(), log_split_page(), LogAccessExclusiveLocks(), LogCurrentRunningXacts(), logical_heap_rewrite_flush_mappings(), LogLogicalMessage(), LogStandbyInvalidations(), movedb(), moveLeafs(), MultiXactIdCreateFromMembers(), nextval_internal(), pg_truncate_visibility_map(), RelationTruncate(), remove_dbtablespaces(), replorigin_advance(), replorigin_drop(), RequestXLogSwitch(), revmap_physical_extend(), shiftList(), spgAddNodeAction(), spgSplitNodeAction(), UpdateFullPageWrites(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), write_relmap_file(), writeListPage(), WriteMTruncateXlogRec(), WriteMZeroPageXlogRec(), WriteSetTimestampXlogRec(), WriteTruncateXlogRec(), WriteZeroPageXlogRec(), XactLogAbortRecord(), XactLogCommitRecord(), XLogPutNextOid(), XLogReportParameters(), XLogRestorePoint(), XLogSaveBufferForHint(), and xlogVacuumPage().

122 {
125  Assert(mainrdata_len == 0);
126 
127  /* cross-check on whether we should be here or not */
128  if (!XLogInsertAllowed())
129  elog(ERROR, "cannot make new WAL entries during recovery");
130 
131  if (begininsert_called)
132  elog(ERROR, "XLogBeginInsert was already called");
133 
134  begininsert_called = true;
135 }
static uint32 mainrdata_len
Definition: xloginsert.c:75
static bool begininsert_called
Definition: xloginsert.c:105
#define ERROR
Definition: elog.h:43
static XLogRecData * mainrdata_head
Definition: xloginsert.c:73
bool XLogInsertAllowed(void)
Definition: xlog.c:8111
static XLogRecData * mainrdata_last
Definition: xloginsert.c:74
#define Assert(condition)
Definition: c.h:738
static int max_registered_block_id
Definition: xloginsert.c:66
#define elog(elevel,...)
Definition: elog.h:214

◆ XLogCheckBufferNeedsBackup()

bool XLogCheckBufferNeedsBackup ( Buffer  buffer)

Definition at line 860 of file xloginsert.c.

References BufferGetPage, doPageWrites, GetFullPageWriteInfo(), PageGetLSN, and RedoRecPtr.

Referenced by log_heap_update().

861 {
863  bool doPageWrites;
864  Page page;
865 
866  GetFullPageWriteInfo(&RedoRecPtr, &doPageWrites);
867 
868  page = BufferGetPage(buffer);
869 
870  if (doPageWrites && PageGetLSN(page) <= RedoRecPtr)
871  return true; /* buffer requires backup */
872 
873  return false; /* buffer does not need to be backed up */
874 }
static bool doPageWrites
Definition: xlog.c:381
static XLogRecPtr RedoRecPtr
Definition: xlog.c:374
#define BufferGetPage(buffer)
Definition: bufmgr.h:160
uint64 XLogRecPtr
Definition: xlogdefs.h:21
#define PageGetLSN(page)
Definition: bufpage.h:366
void GetFullPageWriteInfo(XLogRecPtr *RedoRecPtr_p, bool *doPageWrites_p)
Definition: xlog.c:8318
Pointer Page
Definition: bufpage.h:78

◆ XLogEnsureRecordSpace()

void XLogEnsureRecordSpace ( int  max_block_id,
int  ndatas 
)

Definition at line 147 of file xloginsert.c.

References Assert, CritSectionCount, elog, ERROR, max_rdatas, max_registered_buffers, MemSet, repalloc(), XLR_MAX_BLOCK_ID, XLR_NORMAL_MAX_BLOCK_ID, and XLR_NORMAL_RDATAS.

Referenced by _hash_freeovflpage(), _hash_squeezebucket(), EndPrepare(), gistplacetopage(), log_newpage_range(), and shiftList().

148 {
149  int nbuffers;
150 
151  /*
152  * This must be called before entering a critical section, because
153  * allocating memory inside a critical section can fail. repalloc() will
154  * check the same, but better to check it here too so that we fail
155  * consistently even if the arrays happen to be large enough already.
156  */
157  Assert(CritSectionCount == 0);
158 
159  /* the minimum values can't be decreased */
160  if (max_block_id < XLR_NORMAL_MAX_BLOCK_ID)
161  max_block_id = XLR_NORMAL_MAX_BLOCK_ID;
162  if (ndatas < XLR_NORMAL_RDATAS)
163  ndatas = XLR_NORMAL_RDATAS;
164 
165  if (max_block_id > XLR_MAX_BLOCK_ID)
166  elog(ERROR, "maximum number of WAL record block references exceeded");
167  nbuffers = max_block_id + 1;
168 
169  if (nbuffers > max_registered_buffers)
170  {
172  repalloc(registered_buffers, sizeof(registered_buffer) * nbuffers);
173 
174  /*
175  * At least the padding bytes in the structs must be zeroed, because
176  * they are included in WAL data, but initialize it all for tidiness.
177  */
179  (nbuffers - max_registered_buffers) * sizeof(registered_buffer));
180  max_registered_buffers = nbuffers;
181  }
182 
183  if (ndatas > max_rdatas)
184  {
185  rdatas = (XLogRecData *) repalloc(rdatas, sizeof(XLogRecData) * ndatas);
186  max_rdatas = ndatas;
187  }
188 }
#define XLR_NORMAL_RDATAS
Definition: xloginsert.h:28
#define MemSet(start, val, len)
Definition: c.h:971
#define ERROR
Definition: elog.h:43
static int max_registered_buffers
Definition: xloginsert.c:65
volatile uint32 CritSectionCount
Definition: globals.c:38
static int max_rdatas
Definition: xloginsert.c:103
#define XLR_MAX_BLOCK_ID
Definition: xlogrecord.h:221
static registered_buffer * registered_buffers
Definition: xloginsert.c:64
#define XLR_NORMAL_MAX_BLOCK_ID
Definition: xloginsert.h:27
#define Assert(condition)
Definition: c.h:738
void * repalloc(void *pointer, Size size)
Definition: mcxt.c:1069
#define elog(elevel,...)
Definition: elog.h:214
static XLogRecData * rdatas
Definition: xloginsert.c:101

◆ XLogInsert()

XLogRecPtr XLogInsert ( RmgrId  rmid,
uint8  info 
)

Definition at line 416 of file xloginsert.c.

References begininsert_called, curinsert_flags, doPageWrites, elog, ERROR, GetFullPageWriteInfo(), InvalidXLogRecPtr, IsBootstrapProcessingMode, PANIC, RedoRecPtr, SizeOfXLogLongPHD, XLogInsertRecord(), XLogRecordAssemble(), XLogResetInsertion(), XLR_CHECK_CONSISTENCY, XLR_RMGR_INFO_MASK, and XLR_SPECIAL_REL_UPDATE.

Referenced by _bt_dedup_one_page(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_log_reuse_page(), _bt_mark_page_halfdead(), _bt_newroot(), _bt_split(), _bt_unlink_halfdead_page(), _bt_update_meta_cleanup_info(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), AssignTransactionId(), brin_doinsert(), brin_doupdate(), brinbuild(), brinRevmapDesummarizeRange(), CreateCheckPoint(), createdb(), CreateEndOfRecoveryRecord(), createPostingTree(), CreateTableSpace(), do_pg_stop_backup(), do_setval(), doPickSplit(), DropTableSpace(), EndPrepare(), ExecuteTruncateGuts(), fill_seq_with_data(), GenericXLogFinish(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginUpdateStats(), ginVacuumPostingTreeLeaf(), gistXLogAssignLSN(), gistXLogDelete(), gistXLogPageDelete(), gistXLogPageReuse(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_inplace_update(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_update(), log_heap_clean(), log_heap_cleanup_info(), log_heap_freeze(), log_heap_new_cid(), log_heap_update(), log_heap_visible(), log_newpage(), log_newpage_range(), log_smgrcreate(), log_split_page(), LogAccessExclusiveLocks(), LogCurrentRunningXacts(), logical_heap_rewrite_flush_mappings(), LogLogicalMessage(), LogStandbyInvalidations(), movedb(), moveLeafs(), MultiXactIdCreateFromMembers(), nextval_internal(), pg_truncate_visibility_map(), RelationTruncate(), remove_dbtablespaces(), replorigin_advance(), replorigin_drop(), RequestXLogSwitch(), revmap_physical_extend(), shiftList(), spgAddNodeAction(), spgSplitNodeAction(), UpdateFullPageWrites(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), write_relmap_file(), writeListPage(), WriteMTruncateXlogRec(), WriteMZeroPageXlogRec(), WriteSetTimestampXlogRec(), WriteTruncateXlogRec(), WriteZeroPageXlogRec(), XactLogAbortRecord(), XactLogCommitRecord(), XLogPutNextOid(), XLogReportParameters(), XLogRestorePoint(), XLogSaveBufferForHint(), and xlogVacuumPage().

417 {
418  XLogRecPtr EndPos;
419 
420  /* XLogBeginInsert() must have been called. */
421  if (!begininsert_called)
422  elog(ERROR, "XLogBeginInsert was not called");
423 
424  /*
425  * The caller can set rmgr bits, XLR_SPECIAL_REL_UPDATE and
426  * XLR_CHECK_CONSISTENCY; the rest are reserved for use by me.
427  */
428  if ((info & ~(XLR_RMGR_INFO_MASK |
430  XLR_CHECK_CONSISTENCY)) != 0)
431  elog(PANIC, "invalid xlog info mask %02X", info);
432 
433  TRACE_POSTGRESQL_WAL_INSERT(rmid, info);
434 
435  /*
436  * In bootstrap mode, we don't actually log anything but XLOG resources;
437  * return a phony record pointer.
438  */
439  if (IsBootstrapProcessingMode() && rmid != RM_XLOG_ID)
440  {
442  EndPos = SizeOfXLogLongPHD; /* start of 1st chkpt record */
443  return EndPos;
444  }
445 
446  do
447  {
449  bool doPageWrites;
450  XLogRecPtr fpw_lsn;
451  XLogRecData *rdt;
452  int num_fpw = 0;
453 
454  /*
455  * Get values needed to decide whether to do full-page writes. Since
456  * we don't yet have an insertion lock, these could change under us,
457  * but XLogInsertRecord will recheck them once it has a lock.
458  */
459  GetFullPageWriteInfo(&RedoRecPtr, &doPageWrites);
460 
461  rdt = XLogRecordAssemble(rmid, info, RedoRecPtr, doPageWrites,
462  &fpw_lsn, &num_fpw);
463 
464  EndPos = XLogInsertRecord(rdt, fpw_lsn, curinsert_flags, num_fpw);
465  } while (EndPos == InvalidXLogRecPtr);
466 
468 
469  return EndPos;
470 }
#define InvalidXLogRecPtr
Definition: xlogdefs.h:28
#define XLR_SPECIAL_REL_UPDATE
Definition: xlogrecord.h:71
XLogRecPtr XLogInsertRecord(XLogRecData *rdata, XLogRecPtr fpw_lsn, uint8 flags, int num_fpw)
Definition: xlog.c:996
static bool begininsert_called
Definition: xloginsert.c:105
#define PANIC
Definition: elog.h:53
#define XLR_CHECK_CONSISTENCY
Definition: xlogrecord.h:80
static bool doPageWrites
Definition: xlog.c:381
#define ERROR
Definition: elog.h:43
void XLogResetInsertion(void)
Definition: xloginsert.c:194
static XLogRecPtr RedoRecPtr
Definition: xlog.c:374
uint64 XLogRecPtr
Definition: xlogdefs.h:21
#define IsBootstrapProcessingMode()
Definition: miscadmin.h:392
void GetFullPageWriteInfo(XLogRecPtr *RedoRecPtr_p, bool *doPageWrites_p)
Definition: xlog.c:8318
#define elog(elevel,...)
Definition: elog.h:214
static XLogRecData * XLogRecordAssemble(RmgrId rmid, uint8 info, XLogRecPtr RedoRecPtr, bool doPageWrites, XLogRecPtr *fpw_lsn, int *num_fpw)
Definition: xloginsert.c:485
static uint8 curinsert_flags
Definition: xloginsert.c:78
#define SizeOfXLogLongPHD
Definition: xlog_internal.h:72
#define XLR_RMGR_INFO_MASK
Definition: xlogrecord.h:63

◆ XLogRegisterBlock()

void XLogRegisterBlock ( uint8  block_id,
RelFileNode rnode,
ForkNumber  forknum,
BlockNumber  blknum,
char *  page,
uint8  flags 
)

Definition at line 267 of file xloginsert.c.

References Assert, begininsert_called, registered_buffer::block, elog, ERROR, registered_buffer::flags, registered_buffer::forkno, i, registered_buffer::in_use, max_registered_block_id, max_registered_buffers, registered_buffer::page, registered_buffer::rdata_head, registered_buffer::rdata_len, registered_buffer::rdata_tail, REGBUF_FORCE_IMAGE, RelFileNodeEquals, and registered_buffer::rnode.

Referenced by log_newpage(), and XLogSaveBufferForHint().

269 {
270  registered_buffer *regbuf;
271 
272  /* This is currently only used to WAL-log a full-page image of a page */
273  Assert(flags & REGBUF_FORCE_IMAGE);
275 
276  if (block_id >= max_registered_block_id)
277  max_registered_block_id = block_id + 1;
278 
279  if (block_id >= max_registered_buffers)
280  elog(ERROR, "too many registered buffers");
281 
282  regbuf = &registered_buffers[block_id];
283 
284  regbuf->rnode = *rnode;
285  regbuf->forkno = forknum;
286  regbuf->block = blknum;
287  regbuf->page = page;
288  regbuf->flags = flags;
289  regbuf->rdata_tail = (XLogRecData *) &regbuf->rdata_head;
290  regbuf->rdata_len = 0;
291 
292  /*
293  * Check that this page hasn't already been registered with some other
294  * block_id.
295  */
296 #ifdef USE_ASSERT_CHECKING
297  {
298  int i;
299 
300  for (i = 0; i < max_registered_block_id; i++)
301  {
302  registered_buffer *regbuf_old = &registered_buffers[i];
303 
304  if (i == block_id || !regbuf_old->in_use)
305  continue;
306 
307  Assert(!RelFileNodeEquals(regbuf_old->rnode, regbuf->rnode) ||
308  regbuf_old->forkno != regbuf->forkno ||
309  regbuf_old->block != regbuf->block);
310  }
311  }
312 #endif
313 
314  regbuf->in_use = true;
315 }
BlockNumber block
Definition: xloginsert.c:49
static bool begininsert_called
Definition: xloginsert.c:105
XLogRecData * rdata_head
Definition: xloginsert.c:52
RelFileNode rnode
Definition: xloginsert.c:47
#define ERROR
Definition: elog.h:43
static int max_registered_buffers
Definition: xloginsert.c:65
XLogRecData * rdata_tail
Definition: xloginsert.c:54
static registered_buffer * registered_buffers
Definition: xloginsert.c:64
#define REGBUF_FORCE_IMAGE
Definition: xloginsert.h:31
#define Assert(condition)
Definition: c.h:738
ForkNumber forkno
Definition: xloginsert.c:48
static int max_registered_block_id
Definition: xloginsert.c:66
#define elog(elevel,...)
Definition: elog.h:214
int i
#define RelFileNodeEquals(node1, node2)
Definition: relfilenode.h:88

◆ XLogRegisterBufData()

void XLogRegisterBufData ( uint8  block_id,
char *  data,
int  len 
)

Definition at line 362 of file xloginsert.c.

References Assert, begininsert_called, XLogRecData::data, elog, ERROR, registered_buffer::in_use, XLogRecData::len, max_rdatas, XLogRecData::next, num_rdatas, registered_buffer::rdata_len, and registered_buffer::rdata_tail.

Referenced by _bt_dedup_one_page(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_newroot(), _bt_split(), _bt_unlink_halfdead_page(), _bt_update_meta_cleanup_info(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_squeezebucket(), brin_doinsert(), brin_doupdate(), dataExecPlaceToPageInternal(), dataExecPlaceToPageLeaf(), entryExecPlaceToPage(), GenericXLogFinish(), ginHeapTupleFastInsert(), ginVacuumPostingTreeLeaf(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), heap_inplace_update(), heap_insert(), heap_multi_insert(), log_heap_clean(), log_heap_freeze(), log_heap_update(), and writeListPage().

363 {
364  registered_buffer *regbuf;
365  XLogRecData *rdata;
366 
368 
369  /* find the registered buffer struct */
370  regbuf = &registered_buffers[block_id];
371  if (!regbuf->in_use)
372  elog(ERROR, "no block with id %d registered with WAL insertion",
373  block_id);
374 
375  if (num_rdatas >= max_rdatas)
376  elog(ERROR, "too much WAL data");
377  rdata = &rdatas[num_rdatas++];
378 
379  rdata->data = data;
380  rdata->len = len;
381 
382  regbuf->rdata_tail->next = rdata;
383  regbuf->rdata_tail = rdata;
384  regbuf->rdata_len += len;
385 }
static bool begininsert_called
Definition: xloginsert.c:105
#define ERROR
Definition: elog.h:43
XLogRecData * rdata_tail
Definition: xloginsert.c:54
static int max_rdatas
Definition: xloginsert.c:103
static registered_buffer * registered_buffers
Definition: xloginsert.c:64
static int num_rdatas
Definition: xloginsert.c:102
#define Assert(condition)
Definition: c.h:738
struct XLogRecData * next
#define elog(elevel,...)
Definition: elog.h:214
static XLogRecData * rdatas
Definition: xloginsert.c:101

◆ XLogRegisterBuffer()

void XLogRegisterBuffer ( uint8  block_id,
Buffer  buffer,
uint8  flags 
)

Definition at line 214 of file xloginsert.c.

References Assert, begininsert_called, registered_buffer::block, BufferGetPage, BufferGetTag(), elog, ERROR, registered_buffer::flags, registered_buffer::forkno, i, registered_buffer::in_use, max_registered_block_id, max_registered_buffers, registered_buffer::page, registered_buffer::rdata_head, registered_buffer::rdata_len, registered_buffer::rdata_tail, REGBUF_FORCE_IMAGE, REGBUF_NO_IMAGE, RelFileNodeEquals, and registered_buffer::rnode.

Referenced by _bt_dedup_one_page(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_mark_page_halfdead(), _bt_newroot(), _bt_split(), _bt_unlink_halfdead_page(), _bt_update_meta_cleanup_info(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), brin_doinsert(), brin_doupdate(), brinbuild(), brinRevmapDesummarizeRange(), createPostingTree(), do_setval(), doPickSplit(), fill_seq_with_data(), GenericXLogFinish(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginUpdateStats(), ginVacuumPostingTreeLeaf(), gistXLogDelete(), gistXLogPageDelete(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_inplace_update(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_update(), log_heap_clean(), log_heap_freeze(), log_heap_update(), log_heap_visible(), log_newpage_range(), log_split_page(), moveLeafs(), nextval_internal(), revmap_physical_extend(), shiftList(), spgAddNodeAction(), spgSplitNodeAction(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), writeListPage(), and xlogVacuumPage().

215 {
216  registered_buffer *regbuf;
217 
218  /* NO_IMAGE doesn't make sense with FORCE_IMAGE */
219  Assert(!((flags & REGBUF_FORCE_IMAGE) && (flags & (REGBUF_NO_IMAGE))));
221 
222  if (block_id >= max_registered_block_id)
223  {
224  if (block_id >= max_registered_buffers)
225  elog(ERROR, "too many registered buffers");
226  max_registered_block_id = block_id + 1;
227  }
228 
229  regbuf = &registered_buffers[block_id];
230 
231  BufferGetTag(buffer, &regbuf->rnode, &regbuf->forkno, &regbuf->block);
232  regbuf->page = BufferGetPage(buffer);
233  regbuf->flags = flags;
234  regbuf->rdata_tail = (XLogRecData *) &regbuf->rdata_head;
235  regbuf->rdata_len = 0;
236 
237  /*
238  * Check that this page hasn't already been registered with some other
239  * block_id.
240  */
241 #ifdef USE_ASSERT_CHECKING
242  {
243  int i;
244 
245  for (i = 0; i < max_registered_block_id; i++)
246  {
247  registered_buffer *regbuf_old = &registered_buffers[i];
248 
249  if (i == block_id || !regbuf_old->in_use)
250  continue;
251 
252  Assert(!RelFileNodeEquals(regbuf_old->rnode, regbuf->rnode) ||
253  regbuf_old->forkno != regbuf->forkno ||
254  regbuf_old->block != regbuf->block);
255  }
256  }
257 #endif
258 
259  regbuf->in_use = true;
260 }
BlockNumber block
Definition: xloginsert.c:49
static bool begininsert_called
Definition: xloginsert.c:105
XLogRecData * rdata_head
Definition: xloginsert.c:52
RelFileNode rnode
Definition: xloginsert.c:47
#define ERROR
Definition: elog.h:43
static int max_registered_buffers
Definition: xloginsert.c:65
#define BufferGetPage(buffer)
Definition: bufmgr.h:160
XLogRecData * rdata_tail
Definition: xloginsert.c:54
static registered_buffer * registered_buffers
Definition: xloginsert.c:64
#define REGBUF_FORCE_IMAGE
Definition: xloginsert.h:31
#define Assert(condition)
Definition: c.h:738
#define REGBUF_NO_IMAGE
Definition: xloginsert.h:32
ForkNumber forkno
Definition: xloginsert.c:48
static int max_registered_block_id
Definition: xloginsert.c:66
#define elog(elevel,...)
Definition: elog.h:214
int i
void BufferGetTag(Buffer buffer, RelFileNode *rnode, ForkNumber *forknum, BlockNumber *blknum)
Definition: bufmgr.c:2605
#define RelFileNodeEquals(node1, node2)
Definition: relfilenode.h:88

◆ XLogRegisterData()

void XLogRegisterData ( char *  data,
int  len 
)

Definition at line 324 of file xloginsert.c.

References Assert, begininsert_called, XLogRecData::data, elog, ERROR, XLogRecData::len, mainrdata_len, max_rdatas, XLogRecData::next, and num_rdatas.

Referenced by _bt_dedup_one_page(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_getroot(), _bt_insertonpg(), _bt_log_reuse_page(), _bt_mark_page_halfdead(), _bt_newroot(), _bt_split(), _bt_unlink_halfdead_page(), _hash_addovflpage(), _hash_doinsert(), _hash_expandtable(), _hash_freeovflpage(), _hash_init(), _hash_splitbucket(), _hash_squeezebucket(), _hash_vacuum_one_page(), addLeafTuple(), AssignTransactionId(), brin_doinsert(), brin_doupdate(), brinbuild(), brinRevmapDesummarizeRange(), CreateCheckPoint(), createdb(), CreateEndOfRecoveryRecord(), createPostingTree(), CreateTableSpace(), do_pg_stop_backup(), do_setval(), doPickSplit(), DropTableSpace(), EndPrepare(), ExecuteTruncateGuts(), fill_seq_with_data(), ginDeletePage(), ginHeapTupleFastInsert(), ginPlaceToPage(), ginUpdateStats(), gistXLogAssignLSN(), gistXLogDelete(), gistXLogPageDelete(), gistXLogPageReuse(), gistXLogSplit(), gistXLogUpdate(), hashbucketcleanup(), hashbulkdelete(), heap_abort_speculative(), heap_delete(), heap_finish_speculative(), heap_inplace_update(), heap_insert(), heap_lock_tuple(), heap_lock_updated_tuple_rec(), heap_multi_insert(), heap_update(), log_heap_clean(), log_heap_cleanup_info(), log_heap_freeze(), log_heap_new_cid(), log_heap_update(), log_heap_visible(), log_smgrcreate(), LogAccessExclusiveLocks(), LogCurrentRunningXacts(), logical_heap_rewrite_flush_mappings(), LogLogicalMessage(), LogStandbyInvalidations(), movedb(), moveLeafs(), MultiXactIdCreateFromMembers(), nextval_internal(), pg_truncate_visibility_map(), RelationTruncate(), remove_dbtablespaces(), replorigin_advance(), replorigin_drop(), revmap_physical_extend(), shiftList(), spgAddNodeAction(), spgSplitNodeAction(), UpdateFullPageWrites(), vacuumLeafPage(), vacuumLeafRoot(), vacuumRedirectAndPlaceholder(), write_relmap_file(), writeListPage(), WriteMTruncateXlogRec(), WriteMZeroPageXlogRec(), WriteSetTimestampXlogRec(), WriteTruncateXlogRec(), WriteZeroPageXlogRec(), XactLogAbortRecord(), XactLogCommitRecord(), XLogPutNextOid(), XLogReportParameters(), and XLogRestorePoint().

325 {
326  XLogRecData *rdata;
327 
329 
330  if (num_rdatas >= max_rdatas)
331  elog(ERROR, "too much WAL data");
332  rdata = &rdatas[num_rdatas++];
333 
334  rdata->data = data;
335  rdata->len = len;
336 
337  /*
338  * we use the mainrdata_last pointer to track the end of the chain, so no
339  * need to clear 'next' here.
340  */
341 
342  mainrdata_last->next = rdata;
343  mainrdata_last = rdata;
344 
345  mainrdata_len += len;
346 }
static uint32 mainrdata_len
Definition: xloginsert.c:75
static bool begininsert_called
Definition: xloginsert.c:105
#define ERROR
Definition: elog.h:43
static int max_rdatas
Definition: xloginsert.c:103
static XLogRecData * mainrdata_last
Definition: xloginsert.c:74
static int num_rdatas
Definition: xloginsert.c:102
#define Assert(condition)
Definition: c.h:738
struct XLogRecData * next
#define elog(elevel,...)
Definition: elog.h:214
static XLogRecData * rdatas
Definition: xloginsert.c:101

◆ XLogResetInsertion()

void XLogResetInsertion ( void  )

Definition at line 194 of file xloginsert.c.

References begininsert_called, curinsert_flags, i, mainrdata_len, max_registered_block_id, and num_rdatas.

Referenced by AbortSubTransaction(), AbortTransaction(), and XLogInsert().

195 {
196  int i;
197 
198  for (i = 0; i < max_registered_block_id; i++)
199  registered_buffers[i].in_use = false;
200 
201  num_rdatas = 0;
202  max_registered_block_id = 0;
203  mainrdata_len = 0;
205  curinsert_flags = 0;
206  begininsert_called = false;
207 }
static uint32 mainrdata_len
Definition: xloginsert.c:75
static bool begininsert_called
Definition: xloginsert.c:105
static XLogRecData * mainrdata_head
Definition: xloginsert.c:73
static registered_buffer * registered_buffers
Definition: xloginsert.c:64
static XLogRecData * mainrdata_last
Definition: xloginsert.c:74
static int num_rdatas
Definition: xloginsert.c:102
static int max_registered_block_id
Definition: xloginsert.c:66
int i
static uint8 curinsert_flags
Definition: xloginsert.c:78

◆ XLogSaveBufferForHint()

XLogRecPtr XLogSaveBufferForHint ( Buffer  buffer,
bool  buffer_std 
)

Definition at line 898 of file xloginsert.c.

References Assert, BufferGetBlock, BufferGetLSNAtomic(), BufferGetPage, BufferGetTag(), PGAlignedBlock::data, PGXACT::delayChkpt, GetRedoRecPtr(), InvalidXLogRecPtr, lower(), MyPgXact, RedoRecPtr, REGBUF_FORCE_IMAGE, REGBUF_STANDARD, upper(), XLOG_FPI_FOR_HINT, XLogBeginInsert(), XLogInsert(), and XLogRegisterBlock().

Referenced by MarkBufferDirtyHint().

899 {
900  XLogRecPtr recptr = InvalidXLogRecPtr;
901  XLogRecPtr lsn;
903 
904  /*
905  * Ensure no checkpoint can change our view of RedoRecPtr.
906  */
908 
909  /*
910  * Update RedoRecPtr so that we can make the right decision
911  */
912  RedoRecPtr = GetRedoRecPtr();
913 
914  /*
915  * We assume page LSN is first data on *every* page that can be passed to
916  * XLogInsert, whether it has the standard page layout or not. Since we're
917  * only holding a share-lock on the page, we must take the buffer header
918  * lock when we look at the LSN.
919  */
920  lsn = BufferGetLSNAtomic(buffer);
921 
922  if (lsn <= RedoRecPtr)
923  {
924  int flags;
925  PGAlignedBlock copied_buffer;
926  char *origdata = (char *) BufferGetBlock(buffer);
927  RelFileNode rnode;
928  ForkNumber forkno;
929  BlockNumber blkno;
930 
931  /*
932  * Copy buffer so we don't have to worry about concurrent hint bit or
933  * lsn updates. We assume pd_lower/upper cannot be changed without an
934  * exclusive lock, so the contents bkp are not racy.
935  */
936  if (buffer_std)
937  {
938  /* Assume we can omit data between pd_lower and pd_upper */
939  Page page = BufferGetPage(buffer);
940  uint16 lower = ((PageHeader) page)->pd_lower;
941  uint16 upper = ((PageHeader) page)->pd_upper;
942 
943  memcpy(copied_buffer.data, origdata, lower);
944  memcpy(copied_buffer.data + upper, origdata + upper, BLCKSZ - upper);
945  }
946  else
947  memcpy(copied_buffer.data, origdata, BLCKSZ);
948 
949  XLogBeginInsert();
950 
951  flags = REGBUF_FORCE_IMAGE;
952  if (buffer_std)
953  flags |= REGBUF_STANDARD;
954 
955  BufferGetTag(buffer, &rnode, &forkno, &blkno);
956  XLogRegisterBlock(0, &rnode, forkno, blkno, copied_buffer.data, flags);
957 
958  recptr = XLogInsert(RM_XLOG_ID, XLOG_FPI_FOR_HINT);
959  }
960 
961  return recptr;
962 }
#define InvalidXLogRecPtr
Definition: xlogdefs.h:28
Datum lower(PG_FUNCTION_ARGS)
Definition: oracle_compat.c:43
uint32 BlockNumber
Definition: block.h:31
Datum upper(PG_FUNCTION_ARGS)
Definition: oracle_compat.c:74
PGXACT * MyPgXact
Definition: proc.c:68
char data[BLCKSZ]
Definition: c.h:1104
void XLogRegisterBlock(uint8 block_id, RelFileNode *rnode, ForkNumber forknum, BlockNumber blknum, Page page, uint8 flags)
Definition: xloginsert.c:267
unsigned short uint16
Definition: c.h:366
static XLogRecPtr RedoRecPtr
Definition: xlog.c:374
XLogRecPtr BufferGetLSNAtomic(Buffer buffer)
Definition: bufmgr.c:2847
#define REGBUF_STANDARD
Definition: xloginsert.h:35
#define BufferGetPage(buffer)
Definition: bufmgr.h:160
bool delayChkpt
Definition: proc.h:235
ForkNumber
Definition: relpath.h:40
#define REGBUF_FORCE_IMAGE
Definition: xloginsert.h:31
XLogRecPtr XLogInsert(RmgrId rmid, uint8 info)
Definition: xloginsert.c:416
PageHeaderData * PageHeader
Definition: bufpage.h:166
uint64 XLogRecPtr
Definition: xlogdefs.h:21
#define Assert(condition)
Definition: c.h:738
#define XLOG_FPI_FOR_HINT
Definition: pg_control.h:77
XLogRecPtr GetRedoRecPtr(void)
Definition: xlog.c:8290
void BufferGetTag(Buffer buffer, RelFileNode *rnode, ForkNumber *forknum, BlockNumber *blknum)
Definition: bufmgr.c:2605
void XLogBeginInsert(void)
Definition: xloginsert.c:121
#define BufferGetBlock(buffer)
Definition: bufmgr.h:127
Pointer Page
Definition: bufpage.h:78

◆ XLogSetRecordFlags()

void XLogSetRecordFlags ( uint8  flags)