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

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: pg_waldump stucks with options --follow or -f and --stats or -z
Дата
Msg-id CALj2ACXvDO9ttzduDH_WExbkCDyeaVAbaZbZGGVQmiowHQVUXg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_waldump stucks with options --follow or -f and --stats or -z  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pg_waldump stucks with options --follow or -f and --stats or -z  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Mon, Nov 29, 2021 at 11:09 AM Michael Paquier <michael@paquier.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.

On my Windows 64-bit setup (see below), the CTRL+C works and the
summary stats are printed as with Linux. I believe on 32-bit platforms
we don't have CTRL+C with SIGINT handling right? If yes, I'm not sure
how we go about mentioning it in the pg_waldump documentation. I see
that the pg_receivewal and pg_recvlogical don't mention anything in
the documentation even though their SIGINT handler is defined for
#ifndef WIN32 platforms.
postgres=# select version();
                            version
---------------------------------------------------------------
 PostgreSQL 15devel, compiled by Visual C++ build 1916, 64-bit
(1 row)
postgres=#

Regards,
Bharath Rupireddy.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: Synchronizing slots from primary to standby
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: GUC flags