Re: Synchronous commit behavior during network outage - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: Synchronous commit behavior during network outage
Date
Msg-id 0e45e7cd-7e93-8ea5-6d1b-0dd2c88857ad@enterprisedb.com
Whole thread Raw
In response to Re: Synchronous commit behavior during network outage  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: Synchronous commit behavior during network outage  (Maksim Milyutin <milyutinma@gmail.com>)
Re: Synchronous commit behavior during network outage  (Aleksander Alekseev <aleksander@timescale.com>)
List pgsql-hackers

On 4/20/21 6:23 PM, Aleksander Alekseev wrote:
> Hi Ondřej,
> 
> Thanks for the report. It seems to be a clear violation of what is
> promised in the docs. Although it's unlikely that someone implemented
> an application which deals with important data and "pressed Ctr+C" as
> it's done in psql. So this might be not such a critical issue after
> all. BTW what version of PostgreSQL are you using?
> 

Which part of the docs does this contradict?

With Ctrl+C the application *did not* receive confirmation - the commit
was interrupted before fully completing. In a way, it's about the same
situation as if a regular commit was interrupted randomly. It might have
happened before the commit log got updated, or maybe right after it,
which determines the outcome.

What I find a bit strange is that this inserts 1, 2, 2, 2 locally, and
yet we end up with just two rows with 2 (before the update). I don't see
why a network outage should have such consequence.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Daniel Carter
Date:
Subject: Re: PATCH: Add GSSAPI ccache_name option to libpq
Next
From: Robert Haas
Date:
Subject: Re: pg_amcheck option to install extension