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

Function XLogRegisterData

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

* Add data to the WAL record that's being constructed. * * The data is appended to the "main chunk", available at replay with * XLogRecGetData(). */

Source from the content-addressed store, hash-verified

336 * XLogRecGetData().
337 */
338void
339XLogRegisterData(char *data, int len)
340{
341 XLogRecData *rdata;
342
343 Assert(begininsert_called);
344
345 if (num_rdatas >= max_rdatas)
346 elog(ERROR, "too much WAL data");
347 rdata = &rdatas[num_rdatas++];
348
349 rdata->data = data;
350 rdata->len = len;
351
352 /*
353 * we use the mainrdata_last pointer to track the end of the chain, so no
354 * need to clear 'next' here.
355 */
356
357 mainrdata_last->next = rdata;
358 mainrdata_last = rdata;
359
360 mainrdata_len += len;
361}
362
363/*
364 * Add buffer-specific data to the WAL record that's being constructed.

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

no outgoing calls

Tested by

no test coverage detected