Re: pg_recvlogical prints bogus error when interrupted

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: pg_recvlogical prints bogus error when interrupted
Дата
Msg-id CALj2ACWgqdUiwEY7o85V9Meb21Qa+Y8qxPprT82-ok8WhXArUw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_recvlogical prints bogus error when interrupted  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: pg_recvlogical prints bogus error when interrupted  (Michael Paquier <michael@paquier.xyz>)
Re: pg_recvlogical prints bogus error when interrupted  ("Tristan Partin" <tristan@neon.tech>)
Список pgsql-hackers
On Tue, Apr 11, 2023 at 11:42 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Mon, Oct 24, 2022 at 08:15:11AM +0530, Bharath Rupireddy wrote:
> > The attached patch (pg_recvlogical_graceful_interrupt.text) has a
> > couple of problems, I believe. We're losing prepareToTerminate() with
> > keepalive true and we're not skipping pg_log_error("unexpected
> > termination of replication stream: %s" upon interrupt, after all we're
> > here discussing how to avoid it.
> >
> > I came up with the attached v2 patch, please have a look.
>
> This thread has slipped through the feature freeze deadline.  Would
> people be OK to do something now on HEAD?  A backpatch is also in
> order, IMO, as the current behavior looks confusing under SIGINT and
> SIGTERM.

IMO, +1 for HEAD/PG16 and +0.5 for backpatching as it may not be so
critical to backpatch all the way down. What may happen without this
patch is that the output file isn't fsync-ed upon SIGINT/SIGTERM.
Well, is it a critical issue on production servers?

On Fri, Apr 7, 2023 at 5:12 AM Cary Huang <cary.huang@highgo.ca> wrote:
>
> The following review has been posted through the commitfest application:
>
> The patch applies and tests fine. I like the way to have both ready_to_exit and time_to_abort variables to control
theexit sequence. I think the (void) cast can be removed in front of PQputCopyEnd(), PQflush for consistency purposes
asit does not give warnings and everywhere else does not have those casts. 

Thanks for reviewing. I removed the (void) casts like elsewhere in the
code, however, I didn't change such casts in prepareToTerminate() to
not create a diff.

I'm attaching the v4 patch for further review.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Вложения

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: psql: show current user in prompt
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Autogenerate some wait events code and documentation