Commit 7250d853 authored by Heikki Linnakangas's avatar Heikki Linnakangas

Fix building with WAL_DEBUG.

Now that the backup blocks are appended to the WAL record in xloginsert.c,
XLogInsert doesn't see them anymore and cannot remove them from the version
reconstructed for xlog_outdesc. This makes running with wal_debug=on more
expensive, as we now make (unnecessary) temporary copies of the backup
blocks, but it doesn't seem worth convoluting the code to keep that
optimization.

Reported by Alvaro Herrera.
parent 5ea86e6e
...@@ -1067,11 +1067,8 @@ XLogInsertRecord(XLogRecData *rdata, XLogRecPtr fpw_lsn) ...@@ -1067,11 +1067,8 @@ XLogInsertRecord(XLogRecData *rdata, XLogRecPtr fpw_lsn)
/* /*
* We have to piece together the WAL record data from the * We have to piece together the WAL record data from the
* XLogRecData entries, so that we can pass it to the rm_desc * XLogRecData entries, so that we can pass it to the rm_desc
* function as one contiguous chunk. (but we can leave out any * function as one contiguous chunk.
* extra entries we created for backup blocks)
*/ */
rdt_lastnormal->next = NULL;
initStringInfo(&recordbuf); initStringInfo(&recordbuf);
appendBinaryStringInfo(&recordbuf, (char *) rechdr, sizeof(XLogRecord)); appendBinaryStringInfo(&recordbuf, (char *) rechdr, sizeof(XLogRecord));
for (; rdata != NULL; rdata = rdata->next) for (; rdata != NULL; rdata = rdata->next)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment