Re: psql not responding to SIGINT upon db reconnection

Поиск
Список
Период
Сортировка
От Gurjeet Singh
Тема Re: psql not responding to SIGINT upon db reconnection
Дата
Msg-id CABwTF4ULmrh7v4oY2mjBEfj1LXU_3a10V30QxZfo1+10+z5=AQ@mail.gmail.com
обсуждение исходный текст
Ответ на psql not responding to SIGINT upon db reconnection  ("Tristan Partin" <tristan@neon.tech>)
Ответы Re: psql not responding to SIGINT upon db reconnection  ("Tristan Partin" <tristan@neon.tech>)
Список pgsql-hackers
On Mon, Jul 24, 2023 at 9:26 AM Tristan Partin <tristan@neon.tech> wrote:

> attached patch

+        /*
+         * Restore the default SIGINT behavior while within libpq.
Otherwise, we
+         * can never exit from polling for the database connection. Failure to
+         * restore is non-fatal.
+         */
+        newact.sa_handler = SIG_DFL;
+        rc = sigaction(SIGINT, &newact, &oldact);

    There's no action taken if rc != 0. It doesn't seem right to
continue as if everything's fine when the handler registration fails.
At least a warning is warranted, so that the user reports such
failures to the community.

Best regards,
Gurjeet
http://Gurje.et



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [BUG] Crash on pgbench initialization.
Следующее
От: "Tristan Partin"
Дата:
Сообщение: Re: psql not responding to SIGINT upon db reconnection