1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Change the signature of rm_desc so that it's passed a XLogRecord.

Just feels more natural, and is more consistent with rm_redo.
This commit is contained in:
Heikki Linnakangas
2014-06-14 10:46:48 +03:00
parent f3fdd257a4
commit 0ef0b6784c
37 changed files with 82 additions and 69 deletions

View File

@ -1276,11 +1276,12 @@ begin:;
rdt_lastnormal->next = NULL;
initStringInfo(&recordbuf);
appendBinaryStringInfo(&recordbuf, (char *) &rechdr, sizeof(XLogRecord));
for (; rdata != NULL; rdata = rdata->next)
appendBinaryStringInfo(&recordbuf, rdata->data, rdata->len);
appendStringInfoString(&buf, " - ");
RmgrTable[rechdr->xl_rmid].rm_desc(&buf, rechdr->xl_info, recordbuf.data);
RmgrTable[rechdr->xl_rmid].rm_desc(&buf, (XLogRecord *) recordbuf.data);
pfree(recordbuf.data);
}
elog(LOG, "%s", buf.data);
@ -6627,9 +6628,7 @@ StartupXLOG(void)
(uint32) (EndRecPtr >> 32), (uint32) EndRecPtr);
xlog_outrec(&buf, record);
appendStringInfoString(&buf, " - ");
RmgrTable[record->xl_rmid].rm_desc(&buf,
record->xl_info,
XLogRecGetData(record));
RmgrTable[record->xl_rmid].rm_desc(&buf, record);
elog(LOG, "%s", buf.data);
pfree(buf.data);
}
@ -10453,9 +10452,7 @@ rm_redo_error_callback(void *arg)
StringInfoData buf;
initStringInfo(&buf);
RmgrTable[record->xl_rmid].rm_desc(&buf,
record->xl_info,
XLogRecGetData(record));
RmgrTable[record->xl_rmid].rm_desc(&buf, record);
/* don't bother emitting empty description */
if (buf.len > 0)