Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bf6260b

Browse files
Show isCatalogRel in several rmgr descriptions.
Commit 6af1793 added isCatalogRel field to some WAL record types, but this field was not shown in the rmgr descriptions. This commit changes the several rmgr descriptions to display the isCatalogRel field. Author: Bertrand Drouvot Reviewed-by: Michael Paquier, Masahiko Sawada Discussion: https://postgr.es/m/957dc8f9-2a02-4640-9c01-9dcbf97c4187%40gmail.com
1 parent 387aecc commit bf6260b

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

src/backend/access/rmgrdesc/gistdesc.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,20 @@ out_gistxlogPageUpdate(StringInfo buf, gistxlogPageUpdate *xlrec)
2626
static void
2727
out_gistxlogPageReuse(StringInfo buf, gistxlogPageReuse *xlrec)
2828
{
29-
appendStringInfo(buf, "rel %u/%u/%u; blk %u; snapshotConflictHorizon %u:%u",
29+
appendStringInfo(buf, "rel %u/%u/%u; blk %u; snapshotConflictHorizon %u:%u, isCatalogRel %c",
3030
xlrec->locator.spcOid, xlrec->locator.dbOid,
3131
xlrec->locator.relNumber, xlrec->block,
3232
EpochFromFullTransactionId(xlrec->snapshotConflictHorizon),
33-
XidFromFullTransactionId(xlrec->snapshotConflictHorizon));
33+
XidFromFullTransactionId(xlrec->snapshotConflictHorizon),
34+
xlrec->isCatalogRel ? 'T' : 'F');
3435
}
3536

3637
static void
3738
out_gistxlogDelete(StringInfo buf, gistxlogDelete *xlrec)
3839
{
39-
appendStringInfo(buf, "delete: snapshotConflictHorizon %u, nitems: %u",
40-
xlrec->snapshotConflictHorizon, xlrec->ntodelete);
40+
appendStringInfo(buf, "delete: snapshotConflictHorizon %u, nitems: %u, isCatalogRel %c",
41+
xlrec->snapshotConflictHorizon, xlrec->ntodelete,
42+
xlrec->isCatalogRel ? 'T' : 'F');
4143
}
4244

4345
static void

src/backend/access/rmgrdesc/hashdesc.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,10 @@ hash_desc(StringInfo buf, XLogReaderState *record)
113113
{
114114
xl_hash_vacuum_one_page *xlrec = (xl_hash_vacuum_one_page *) rec;
115115

116-
appendStringInfo(buf, "ntuples %d, snapshotConflictHorizon %u",
116+
appendStringInfo(buf, "ntuples %d, snapshotConflictHorizon %u, isCatalogRel %c",
117117
xlrec->ntuples,
118-
xlrec->snapshotConflictHorizon);
118+
xlrec->snapshotConflictHorizon,
119+
xlrec->isCatalogRel ? 'T' : 'F');
119120
break;
120121
}
121122
}

src/backend/access/rmgrdesc/heapdesc.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,11 @@ heap2_desc(StringInfo buf, XLogReaderState *record)
179179
{
180180
xl_heap_prune *xlrec = (xl_heap_prune *) rec;
181181

182-
appendStringInfo(buf, "snapshotConflictHorizon: %u, nredirected: %u, ndead: %u",
182+
appendStringInfo(buf, "snapshotConflictHorizon: %u, nredirected: %u, ndead: %u, isCatalogRel: %c",
183183
xlrec->snapshotConflictHorizon,
184184
xlrec->nredirected,
185-
xlrec->ndead);
185+
xlrec->ndead,
186+
xlrec->isCatalogRel ? 'T' : 'F');
186187

187188
if (XLogRecHasBlockData(record, 0))
188189
{
@@ -238,8 +239,9 @@ heap2_desc(StringInfo buf, XLogReaderState *record)
238239
{
239240
xl_heap_freeze_page *xlrec = (xl_heap_freeze_page *) rec;
240241

241-
appendStringInfo(buf, "snapshotConflictHorizon: %u, nplans: %u",
242-
xlrec->snapshotConflictHorizon, xlrec->nplans);
242+
appendStringInfo(buf, "snapshotConflictHorizon: %u, nplans: %u, isCatalogRel: %c",
243+
xlrec->snapshotConflictHorizon, xlrec->nplans,
244+
xlrec->isCatalogRel ? 'T' : 'F');
243245

244246
if (XLogRecHasBlockData(record, 0))
245247
{

src/backend/access/rmgrdesc/nbtdesc.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ btree_desc(StringInfo buf, XLogReaderState *record)
7171
{
7272
xl_btree_delete *xlrec = (xl_btree_delete *) rec;
7373

74-
appendStringInfo(buf, "snapshotConflictHorizon: %u, ndeleted: %u, nupdated: %u",
74+
appendStringInfo(buf, "snapshotConflictHorizon: %u, ndeleted: %u, nupdated: %u, isCatalogRel: %c",
7575
xlrec->snapshotConflictHorizon,
76-
xlrec->ndeleted, xlrec->nupdated);
76+
xlrec->ndeleted, xlrec->nupdated,
77+
xlrec->isCatalogRel ? 'T' : 'F');
7778

7879
if (XLogRecHasBlockData(record, 0))
7980
delvacuum_desc(buf, XLogRecGetBlockData(record, 0, NULL),
@@ -113,11 +114,12 @@ btree_desc(StringInfo buf, XLogReaderState *record)
113114
{
114115
xl_btree_reuse_page *xlrec = (xl_btree_reuse_page *) rec;
115116

116-
appendStringInfo(buf, "rel: %u/%u/%u, snapshotConflictHorizon: %u:%u",
117+
appendStringInfo(buf, "rel: %u/%u/%u, snapshotConflictHorizon: %u:%u, isCatalogRel: %c",
117118
xlrec->locator.spcOid, xlrec->locator.dbOid,
118119
xlrec->locator.relNumber,
119120
EpochFromFullTransactionId(xlrec->snapshotConflictHorizon),
120-
XidFromFullTransactionId(xlrec->snapshotConflictHorizon));
121+
XidFromFullTransactionId(xlrec->snapshotConflictHorizon),
122+
xlrec->isCatalogRel ? 'T' : 'F');
121123
break;
122124
}
123125
case XLOG_BTREE_META_CLEANUP:

src/backend/access/rmgrdesc/spgdesc.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,11 @@ spg_desc(StringInfo buf, XLogReaderState *record)
118118
{
119119
spgxlogVacuumRedirect *xlrec = (spgxlogVacuumRedirect *) rec;
120120

121-
appendStringInfo(buf, "ntoplaceholder: %u, firstplaceholder: %u, snapshotConflictHorizon: %u",
121+
appendStringInfo(buf, "ntoplaceholder: %u, firstplaceholder: %u, snapshotConflictHorizon: %u, isCatalogRel: %c",
122122
xlrec->nToPlaceholder,
123123
xlrec->firstPlaceholder,
124-
xlrec->snapshotConflictHorizon);
124+
xlrec->snapshotConflictHorizon,
125+
xlrec->isCatalogRel ? 'T' : 'F');
125126
}
126127
break;
127128
}

0 commit comments

Comments
 (0)