Re: Synchronous commit behavior during network outage

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Synchronous commit behavior during network outage
Дата
Msg-id 8c55ff8f848551c9546128a02ed69ea10c2c2838.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Synchronous commit behavior during network outage  (Ondřej Žižka <ondrej.zizka@stratox.cz>)
Ответы Re: Synchronous commit behavior during network outage
Список pgsql-hackers
On Tue, 2021-04-20 at 18:49 +0100, Ondřej Žižka wrote:
> tecmint=# select * from a; --> LAN on sync replica is OK
>   id
> ----
>    1
> (1 row)
> 
> tecmint=# insert into a values (2); ---> LAN on sync replica is DOWN and 
> insert is waiting. During this time kill the background process on the 
> PostgreSQL server for this session
> WARNING:  canceling the wait for synchronous replication and terminating 
> connection due to administrator command
> DETAIL:  The transaction has already committed locally, but might not 
> have been replicated to the standby.
> server closed the connection unexpectedly
>      This probably means the server terminated abnormally
>      before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded.
> 
> tecmint=# select * from a;
>   id
> ----
>    1
>    2
> (2 rows)

It is well known that synchronous replication is sublect to that problem,
since it doesn't use the two-phase commit protocol.

What surprises me is that this is a warning.
In my opinion it should be an error.

Yours,
Laurenz Albe




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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: Replication slot stats misgivings
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Synchronous commit behavior during network outage