wal_debug_fix.diff
text/x-diff
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: context
| File | + | − |
|---|---|---|
| src/backend/access/transam/xlog.c | 20 | 0 |
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
***************
*** 1033,1039 **** begin:;
#ifdef WAL_DEBUG
if (XLOG_DEBUG)
{
! StringInfoData buf;
initStringInfo(&buf);
appendStringInfo(&buf, "INSERT @ %X/%X: ",
--- 1033,1056 ----
#ifdef WAL_DEBUG
if (XLOG_DEBUG)
{
! StringInfoData buf;
! char *full_rec = palloc(write_len), *ins_ptr;
!
! /*
! * We need assemble the entire record once, to be able to dump it out
! * properly.
! */
! rdt = rdata;
! ins_ptr = full_rec;
! while (rdt)
! {
! if (rdt->data != NULL)
! {
! memcpy(ins_ptr, rdt->data, rdt->len);
! ins_ptr += rdt->len;
! }
! rdt = rdt->next;
! }
initStringInfo(&buf);
appendStringInfo(&buf, "INSERT @ %X/%X: ",
***************
*** 1042,1051 **** begin:;
if (rdata->data != NULL)
{
appendStringInfo(&buf, " - ");
! RmgrTable[rechdr->xl_rmid].rm_desc(&buf, rechdr->xl_info, rdata->data);
}
elog(LOG, "%s", buf.data);
pfree(buf.data);
}
#endif
--- 1059,1069 ----
if (rdata->data != NULL)
{
appendStringInfo(&buf, " - ");
! RmgrTable[rechdr->xl_rmid].rm_desc(&buf, rechdr->xl_info, full_rec);
}
elog(LOG, "%s", buf.data);
pfree(buf.data);
+ pfree(full_rec);
}
#endif