Re: Synchronous commit behavior during network outage

From: Ondřej Žižka <ondrej(dot)zizka(at)stratox(dot)cz>
To: Maksim Milyutin <milyutinma(at)gmail(dot)com>, Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Synchronous commit behavior during network outage
Date: 2021-04-20 18:00:22
Message-ID: de7aebfa-4512-cc81-613c-b5f9f4756392@stratox.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Maksim,

I know your post [1]. That thread is why there we performed more tests
(see another my email in this thread). We are trying to somehow
implement RPO=0 solution using PostgreSQL. Knowing this... Would be
possible to build RPO=0 solution with PostgreSQL?

Ondrej

On 20/04/2021 18:51, Maksim Milyutin wrote:
> 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
>
> 2.
> https://www.postgresql.org/message-id/CANtu0ogbu%2By6Py963p-zKJ535b8zm5AOq7zkX7wW-tryPYi1DA%40mail.gmail.com
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ondřej Žižka 2021-04-20 18:05:31 Re: Synchronous commit behavior during network outage
Previous Message Stefan Keller 2021-04-20 17:56:07 Re: ML-based indexing ("The Case for Learned Index Structures", a paper from Google)