Re: PG replicas and transactions atomicity - Mailing list pgsql-general

From Christophe Pettus
Subject Re: PG replicas and transactions atomicity
Date
Msg-id A865FACB-6799-43E5-A2EF-D65EB9CAAA78@thebuild.com
Whole thread Raw
In response to PG replicas and transactions atomicity  (Louis Laborde <louis.laborde@gmail.com>)
List pgsql-general

> On Jan 5, 2023, at 19:38, Bhautik Chudasama <bhautikrchudasama@gmail.com> wrote:
>
> Does it mean when we commit transaction, client will wait until all replicas successfully committed the transaction.

It depends.  If all the settings are the defaults, no, the client won't wait for the replicas to acknowledge the commit
ofthe transaction.  This is asynchronous replication. 

Synchronous replication can be set up, though, in which case the client will wait until some or all of the replicas
havereported back that they've committed, depending on how it is configured.  The documentation explains the detailsl: 

    https://www.postgresql.org/docs/current/warm-standby.html#SYNCHRONOUS-REPLICATION


pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: PG replicas and transactions atomicity
Next
From: Laurenz Albe
Date:
Subject: Re: postgres restore & needed history files