From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_waldump stucks with options --follow or -f and --stats or -z |
Date: | 2021-11-18 08:02:08 |
Message-ID: | CALj2ACX6EPZZQZszz-MVD4HOAzhrVhoeRm=ZBdKrsFXTsYe1hw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Nov 18, 2021 at 12:05 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
>
> On 2021-Nov-17, Bharath Rupireddy wrote:
>
> > On Wed, Nov 17, 2021 at 7:49 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> > >
> > > At the same time, we could also just let things as they are. --follow
> > > and --stats being specified together is what the user looked for, so
> > > they get what they wanted.
> >
> > I think the existing way of pg_waldump getting stuck with the
> > combination of options "-s/-f/-z" and "-s/-e/-f/-z" doesn't look good
> > for an end user.
>
> I agree that it's not right, but I don't think the solution is to ban
> the combination. I think what we should do is change the behavior to
> make the combination potentially useful, so that it waits until program
> termination and print the summary then. Consider "strace -c" as a
> precedent: it will also "become stuck" until you kill it, and then it'll
> print a nice table, just like the pg_waldump -z gives you.
>
> I think I would even have had occasion to use this as a feature in the
> past ...
Hm. So, the pg_waldump can have handlers for SIGINT, SIGTERM, SIGQUIT
and then it should emit the computed stats in those handlers the
comobinations - "-s/-f/-z" and "-s/-e/-f/-z". I'm okay with this
behaviour. Michael Paquier had suggested the same upthread. If okay, I
will work on that patch.
Thoughts?
Regards,
Bharath Rupireddy.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2021-11-18 08:17:25 | Re: CREATE tab completion |
Previous Message | Bharath Rupireddy | 2021-11-18 07:38:44 | Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir |