Re: pg_waldump/heapdesc.c and struct field names - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: pg_waldump/heapdesc.c and struct field names
Date
Msg-id CAD21AoA6FuaioSmq3FQ2rX3qCqhC8Y1RA__VC6nOO9krPKUsNQ@mail.gmail.com
Whole thread Raw
In response to pg_waldump/heapdesc.c and struct field names  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: pg_waldump/heapdesc.c and struct field names
List pgsql-hackers
On Mon, Jan 4, 2021 at 12:55 PM Peter Geoghegan <pg@bowt.ie> wrote:
>
> I notice that heapdesc.c outputs the field latestRemovedXid as
> "remxid". But why? What sense is there in changing the name for output
> by tools like pg_waldump, which are intrinsically internals focussed?

Not sure but it has been "remxid" from the beginning. See efc16ea5206.

> Does anyone have any objections to my changing the details within
> heapdesc.c on master, so that pg_waldump will use struct field names?
> It doesn't seem necessary to change the output that has spaces instead
> of an underscore, or something like that. It just seems worth removing
> gratuitous inconsistencies, such as this one.

+1 for changing heapdesc.c on master. It's not only readable but also
consistent with other *desc showing the field named latestRemovedXid.
For instance, nbtdesc.c has:

        case XLOG_BTREE_REUSE_PAGE:
            {
                xl_btree_reuse_page *xlrec = (xl_btree_reuse_page *) rec;

                appendStringInfo(buf, "rel %u/%u/%u; latestRemovedXid %u",
                                 xlrec->node.spcNode, xlrec->node.dbNode,
                                 xlrec->node.relNode, xlrec->latestRemovedXid);
                break;
            }

Regards,

-- 
Masahiko Sawada
EnterpriseDB:  https://www.enterprisedb.com/



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: pg_waldump/heapdesc.c and struct field names
Next
From: Amit Kapila
Date:
Subject: Re: faster ETL / bulk data load for heap tables