From: | Japin Li <japinli(at)hotmail(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | David Christensen <david(dot)christensen(at)crunchydata(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: [PATCH] add relation and block-level filtering to pg_waldump |
Date: | 2022-03-25 00:43:30 |
Message-ID: | MEYP282MB166915697F54EB47877F6DB6B61A9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 25 Mar 2022 at 05:11, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> Cool.
>
> I had another thought while changing that (and also re-alphabetising):
> Why don't we switch to -B for --block and -R for --relation? I
> gather you used -k and -l because -b and -r were already taken, but
> since we already started using upper case for -F, it seems consistent
> this way. Or were they chosen for consistency with something else?
>
> It's also slightly more helpful to a user if the help says
> --relation=T/D/R instead of N/N/N (TS/DB/REL would be nicer but
> doesn't fit in the space).
Thanks for updating the patch!
+ 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.
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"));
+ 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.
--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-03-25 00:45:07 | Re: Corruption during WAL replay |
Previous Message | Tom Lane | 2022-03-25 00:40:19 | Re: pg_dump new feature: exporting functions only. Bad or good idea ? |