public inbox for [email protected]
help / color / mirror / Atom feedFrom: Japin Li <[email protected]>
To: Thomas Munro <[email protected]>
Cc: David Christensen <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: [PATCH] add relation and block-level filtering to pg_waldump
Date: Fri, 25 Mar 2022 09:32:49 +0800
Message-ID: <MEYP282MB16698466E671832348807445B61A9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CA+hUKGL0Uh7vVNCLCV4K=ZCG7nVXa1SHmqqJin9WFgRGxqNZcw@mail.gmail.com>
References: <CA+hUKGL+0PrQmEnnHidi1Vc-5f8Bqo4bpHAbuBk778c1k8Aiow@mail.gmail.com>
<[email protected]>
<CA+hUKGJL3LztRrLa=ba87_08cKnfoSJ3U1f=E+9o+wG7hwwDhg@mail.gmail.com>
<MEYP282MB166915697F54EB47877F6DB6B61A9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
<CA+hUKGL0Uh7vVNCLCV4K=ZCG7nVXa1SHmqqJin9WFgRGxqNZcw@mail.gmail.com>
On Fri, 25 Mar 2022 at 08:55, Thomas Munro <[email protected]> wrote:
> On Fri, Mar 25, 2022 at 1:43 PM Japin Li <[email protected]> wrote:
>> + printf(_(" -x, --xid=XID only show records with transaction ID XID\n"));
>>
>> I think the description of transaction ID is enough, IIUC, XID is use in core,
>> which means transaction ID.
>
> The mention of "XID" corresponds to XID on the left, like a sort of
> variable. That text is not changed by this patch.
>
>> See: src/bin/pg_resetwal/pg_resetwal.c
>>
>> 1239 printf(_(" -V, --version output version information, then exit\n"));
>> 1240 printf(_(" -x, --next-transaction-id=XID set next transaction ID\n"));
>
> Hmm, yeah that is inconsistent, but it seems like it is pg_resetwal.c
> that is not following the notational convention there. Other things
> in pg_resetwal's --help use that 'variable' style.
>
Thanks for your explanation!
>> + if (sscanf(optarg, "%u/%u/%u",
>> + &config.filter_by_relation.spcNode,
>> + &config.filter_by_relation.dbNode,
>> + &config.filter_by_relation.relNode) != 3 ||
>> + !OidIsValid(config.filter_by_relation.spcNode) ||
>> + !OidIsValid(config.filter_by_relation.relNode))
>>
>> It seems we should also check the dbNode.
>
> This was discussed earlier: it's OK for the dbNode to be invalid (0),
> because that's how shared relations like pg_database are referenced.
> Like this:
>
> $ pg_waldump pgdata/pg_wal/000000010000000000000001 --relation
> 1664/0/1262 --fork vm --limit 1
> rmgr: Heap2 len (rec/tot): 64/ 8256, tx: 0, lsn:
> 0/01491F20, prev 0/01491EC0, desc: VISIBLE cutoff xid 1 flags 0x03,
> blkref #0: rel 1664/0/1262 fork vm blk 0 FPW, blkref #1: rel
> 1664/0/1262 blk 0
>
Oh, my bad, I missed the discussion email. Sorry for the noise.
--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.
view thread (16+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: [PATCH] add relation and block-level filtering to pg_waldump
In-Reply-To: <MEYP282MB16698466E671832348807445B61A9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox