Re: Question: Is it possible to get the new xlog position after query execution?

From: Oleg Serov <oleg(at)slapdash(dot)com>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Question: Is it possible to get the new xlog position after query execution?
Date: 2021-11-08 18:03:32
Message-ID: CAH2JyMQoA-a=WMu4mbjPQE-5JNMNrpkFLme_AYmwDiBKGcay=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 8, 2021 at 12:12 PM Christophe Pettus <xof(at)thebuild(dot)com> wrote:

>
>
> > On Nov 7, 2021, at 19:42, Oleg Serov <oleg(at)slapdash(dot)com> wrote:
> > How would you accomplish this otherwise?
>
> Synchronous commit. It sounds like you are attempting to build the same
> kind of guarantees that synchronous commit provides, only in the
> application by polling LSNs. It might be best just to use synchronous
> commit, so that you know that once the transaction is committed, the
> secondary has it.

That does not seem to be feasible for our application. Using synchronous
commit affects performance and really makes replication not really
useful... What we want to achieve is to have a consistent DB state across
all connections for master and replica per user. If other users see
something outdated, is OK.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Frey 2021-11-08 18:59:01 libpq: How to cancel a COPY ... TO statement?
Previous Message Christophe Pettus 2021-11-08 17:11:15 Re: Question: Is it possible to get the new xlog position after query execution?