Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication
Дата
Msg-id CAAhFRxjFGSk-hVTjnpFwm1XBUcHL8Obugt=P+ixV5AD9H+Kkrw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication  (Andrey Borodin <amborodin86@gmail.com>)
Список pgsql-hackers
On Thu, Sep 29, 2022 at 3:53 PM Bruce Momjian <bruce@momjian.us> wrote:
>
> So, what happens when an insufficient number of synchronous replicas
> reply?

It's a failover.

> Sessions hang because the synchronous behavior cannot be
> guaranteed.  We then _allow_ query cancel so the user or administrator
> can get out of the hung sessions and perhaps modify
> synchronous_standby_names.

Administrators should not modify synchronous_standby_names.
Administrator must shoot this not in the head.

> I have always felt this has to be done at the server level, meaning when
> a synchronous_standby_names replica is not responding after a certain
> timeout, the administrator must be notified by calling a shell command
> defined in a GUC and all sessions will ignore the replica.

Standbys are expelled from the waitlist according to quorum rules. I'd
propose not to invent more quorum rules involving shell scripts.
The Administrator expressed what number of standbys can be offline by
setting synchronous_standby_names. They actively asked for hanging
queries in case of insufficient standbys.

We have reserved administrator connections for the case when all
connection slots are used by hanging queries.


Best regards, Andrey Borodin.



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [patch] Have psql's \d+ indicate foreign partitions
Следующее
От: Japin Li
Дата:
Сообщение: Re: Locks release order in LogStandbySnapshot