From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, 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-12-01 06:14:02 |
Message-ID: | CALj2ACVHb8Gx7o0bHKbk8j=WcpmAesqp0+=Bq2MXr6e2kAJk1g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 29, 2021 at 1:16 PM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Mon, Nov 29, 2021 at 11:09 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > On Sun, Nov 28, 2021 at 12:13:08PM +0530, Bharath Rupireddy wrote:
> > > Thanks. Here's the v5.
> >
> > By the way, one thing that I completely forgot here is that SIGINT is
> > not handled on Windows. If we want to make that work for a WIN32
> > terminal, we would need to do something similar to
> > src/fe_utils/cancel.c where we need to use SetConsoleCtrlHandler() and
> > handle the stats print when facing CTRL_C_EVENT or CTRL_BREAK_EVENT as
> > events. Perhaps we should try to think harder and have a more
> > centralized facility for the handler part between a WIN32 terminal and
> > SIGINT, as it is not the first time that we need this level of
> > handling. Or we could just discard this issue, document its WIN32
> > limitation and paint some "#ifdef WIN32" around all the handler
> > portions of the patch.
> >
> > I would be fine with just doing the latter for now, as this stuff is
> > still useful for most users, but that's worth mentioning. Any
> > opinions?
>
> I'm okay to have the same behaviour as pg_receivewal and pg_recvlogical tools.
Here's the v6 patch that has the SIGINT handling enabled for non-WIN32
platforms (note that I haven't specified anything in the
documentation) much like pg_receivewal and pg_recvlogical.
Regards,
Bharath Rupireddy.
Attachment | Content-Type | Size |
---|---|---|
v6-0001-pg_waldump-emit-stats-when-interrupted-with-SIGIN.patch | application/octet-stream | 4.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amul Sul | 2021-12-01 06:19:05 | Re: Update stale code comment in CheckpointerMain() |
Previous Message | vignesh C | 2021-12-01 06:01:32 | Re: Optionally automatically disable logical replication subscriptions on error |