From: | Maksim Milyutin <milyutinma(at)gmail(dot)com> |
---|---|
To: | Aleksander Alekseev <aleksander(at)timescale(dot)com>, Ondřej Žižka <ondrej(dot)zizka(at)stratox(dot)cz> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Synchronous commit behavior during network outage |
Date: | 2021-04-20 17:51:08 |
Message-ID: | 59b70770-8dbc-8ca4-b53f-63d306a64bd3@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi!
This is a known issue with synchronous replication [1]. You might inject
into unmodified operation some dummy modification to overcome the
negative sides of such partially committing without source code patching.
On 20.04.2021 19:23, Aleksander Alekseev wrote:
> Although it's unlikely that someone implemented
> an application which deals with important data and "pressed Ctr+C" as
> it's done in psql.
Some client libraries have feature to cancel session that has similar
effect to "Ctrl+C" from psql after specified by client deadline
expiration [2]. Hence, this case might be quite often when application
interacts with database.
> On Mon, Apr 19, 2021 at 10:13 PM Ondřej Žižka <ondrej(dot)zizka(at)stratox(dot)cz> wrote:
>
> From the synchronous_commit=remote_write level and "higher", I would expect, that when the remote application (doesn't matter if flush, write or apply) would not be applied I would not receive a confirmation about the commit (even with a warning). Something like, if there is no commit from sync replica, there is no commit on primary and if someone performs the steps above, the whole transaction will not send a confirmation.
The warning have to be accounted here and performed commit have not to
be treated as *successful*.
1.
https://www.postgresql.org/message-id/C1F7905E-5DB2-497D-ABCC-E14D4DEE506C%40yandex-team.ru
--
Regards,
Maksim Milyutin
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Keller | 2021-04-20 17:56:07 | Re: ML-based indexing ("The Case for Learned Index Structures", a paper from Google) |
Previous Message | Ondřej Žižka | 2021-04-20 17:49:21 | Re: Synchronous commit behavior during network outage |