MCPcopy Create free account
hub / github.com/apache/cloudberry / XLogBeginInsert

Function XLogBeginInsert

src/backend/access/transam/xloginsert.c:131–146  ·  view source on GitHub ↗

* Begin constructing a WAL record. This must be called before the * XLogRegister* functions and XLogInsert(). */

Source from the content-addressed store, hash-verified

129 * XLogRegister* functions and XLogInsert().
130 */
131void
132XLogBeginInsert(void)
133{
134 Assert(max_registered_block_id == 0);
135 Assert(mainrdata_last == (XLogRecData *) &mainrdata_head);
136 Assert(mainrdata_len == 0);
137
138 /* cross-check on whether we should be here or not */
139 if (!XLogInsertAllowed())
140 elog(ERROR, "cannot make new WAL entries during recovery");
141
142 if (begininsert_called)
143 elog(ERROR, "XLogBeginInsert was already called");
144
145 begininsert_called = true;
146}
147
148/*
149 * Ensure that there are enough buffer and data slots in the working area,

Callers 15

XLogPaxInsertFunction · 0.85
XLogPaxCreateDirectoryFunction · 0.85
XLogPaxTruncateFunction · 0.85
write_relmap_fileFunction · 0.85
LogLogicalInvalidationsFunction · 0.85
createdbFunction · 0.85
movedbFunction · 0.85
remove_dbtablespacesFunction · 0.85
CreateTableSpaceFunction · 0.85
DropTableSpaceFunction · 0.85
ExecuteTruncateGutsFunction · 0.85

Calls 1

XLogInsertAllowedFunction · 0.85

Tested by

no test coverage detected