Standardize one aspect of rmgr desc output.
authorPeter Geoghegan <[email protected]>
Tue, 5 Jan 2021 03:46:11 +0000 (19:46 -0800)
committerPeter Geoghegan <[email protected]>
Tue, 5 Jan 2021 03:46:11 +0000 (19:46 -0800)
Bring heap and hash rmgr desc output in line with nbtree and GiST desc
output by using the name latestRemovedXid for all fields that output the
contents of the latestRemovedXid field from the WAL record's C struct
(stop using local variants).

This seems like a clear improvement because latestRemovedXid is a symbol
name that already appears across many different source files, and so is
probably much more recognizable.

Discussion: https://postgr.es/m/CAH2-Wzkt_Rs4VqPSCk87nyjPAAEmWL8STU9zgET_83EF5YfrLw@mail.gmail.com

src/backend/access/rmgrdesc/hashdesc.c
src/backend/access/rmgrdesc/heapdesc.c

index 55de27840d98d243c5d710060e811a0cefd5b4ca..90ccea08e2c494fed57e5099b22eadb25849e4d2 100644 (file)
@@ -113,7 +113,7 @@ hash_desc(StringInfo buf, XLogReaderState *record)
            {
                xl_hash_vacuum_one_page *xlrec = (xl_hash_vacuum_one_page *) rec;
 
-               appendStringInfo(buf, "ntuples %d, latest removed xid %u",
+               appendStringInfo(buf, "ntuples %d, latestRemovedXid %u",
                                 xlrec->ntuples,
                                 xlrec->latestRemovedXid);
                break;
index 871c7a155e8c56cb7a6b62c9f29929b8966e598a..e60e32b9353de6146bc32089df7819db2aa7e3fb 100644 (file)
@@ -125,7 +125,7 @@ heap2_desc(StringInfo buf, XLogReaderState *record)
    {
        xl_heap_clean *xlrec = (xl_heap_clean *) rec;
 
-       appendStringInfo(buf, "remxid %u", xlrec->latestRemovedXid);
+       appendStringInfo(buf, "latestRemovedXid %u", xlrec->latestRemovedXid);
    }
    else if (info == XLOG_HEAP2_FREEZE_PAGE)
    {
@@ -138,7 +138,7 @@ heap2_desc(StringInfo buf, XLogReaderState *record)
    {
        xl_heap_cleanup_info *xlrec = (xl_heap_cleanup_info *) rec;
 
-       appendStringInfo(buf, "remxid %u", xlrec->latestRemovedXid);
+       appendStringInfo(buf, "latestRemovedXid %u", xlrec->latestRemovedXid);
    }
    else if (info == XLOG_HEAP2_VISIBLE)
    {