pg_waldump stucks with options --follow or -f and --stats or -z

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: pg_waldump stucks with options --follow or -f and --stats or -z
Date: 2021-11-15 14:02:38
Message-ID: CALj2ACUUx3PcK2z9h0_m7vehreZAUbcmOky9WSEpe8TofhV=PQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

pg_waldump options, --follow or -f(to keep polling once per second for
new WAL to appear) and --stats or -z don't work well together i.e. the
command stucks [1]. I think the pg_waldump should emit an error. Note
that the pg_basebakup does error out on incompatible options.

Here's a small patch for fixing above along with a note in the documentation.

Thoughts?

[1] The following commands stuck:
./pg_waldump -p data/ -s 0/7000060 -f -z
./pg_waldump -p data/ -s 0/7000060 -f --stats='record'
./pg_waldump -p data/ -s 0/7000060 -f --stats='rmgr'

[2]
ubuntu3:~/postgres/inst/bin$ ./pg_waldump -p data/ -s 0/7000060 -f -z
pg_waldump: error: --follow and --stats are incompatible options
Try "pg_waldump --help" for more information.
bharath(at)bharathubuntu3:~/postgres/inst/bin$

Regards,
Bharath Rupireddy.

Attachment Content-Type Size
v1-0001-pg_waldump-error-out-with-options-follow-and-stat.patch application/octet-stream 2.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-11-15 14:15:49 Re: RFC: Logging plan of the running query
Previous Message torikoshia 2021-11-15 14:00:12 Re: RFC: Logging plan of the running query