Re: Synchronous commit behavior during network outage

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Ondřej Žižka <ondrej(dot)zizka(at)stratox(dot)cz>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Synchronous commit behavior during network outage
Date: 2021-04-21 07:54:10
Message-ID: CAFj8pRApXAA1uhF3KwUyW-UwWWrfS+dOuy+p+4sEXnuDYtUS-Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

st 21. 4. 2021 v 9:51 odesílatel Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
napsal:

> 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.
>

yes, the an error has more sense

Regards

Pavel

> Yours,
> Laurenz Albe
>
>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message houzj.fnst@fujitsu.com 2021-04-21 08:09:25 RE: [bug?] Missed parallel safety checks, and wrong parallel safety
Previous Message Laurenz Albe 2021-04-21 07:50:47 Re: Synchronous commit behavior during network outage