pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christophe Pettus <xof@thebuild.com>
To: Oleg Serov <oleg@slapdash.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Question: Is it possible to get the new xlog position after query execution?
Date: Mon, 8 Nov 2021 11:13:25 -0800
Message-ID: <209CB91E-B785-4BEB-8CAC-4A2FEF700D1B@thebuild.com> (raw)
In-Reply-To: <CAH2JyMQoA-a=WMu4mbjPQE-5JNMNrpkFLme_AYmwDiBKGcay=w@mail.gmail.com>
References: <CAH2JyMT=UY989a9WNcu_E1OAh7GyM1YDjhKUa-060CAH5uqhuA@mail.gmail.com>
	<YX78rSSOdFuyL9yi@hjp.at>
	<CAH2JyMR+eOAPig4xowOMGm0bMSKXBUh=sTMty4+3vaPXH2iMPQ@mail.gmail.com>
	<YYZsOdU3C5pSZ1um@hjp.at>
	<CAH2JyMS4mJ+=oR==9Q0otwXSK1bVrFPBRVMbyuktmunJr9Jofg@mail.gmail.com>
	<CF73DC8D-118F-4777-82E4-599EBC0FB64E@thebuild.com>
	<CAH2JyMQoA-a=WMu4mbjPQE-5JNMNrpkFLme_AYmwDiBKGcay=w@mail.gmail.com>



> On Nov 8, 2021, at 10:03, Oleg Serov <oleg@slapdash.com> wrote:
> 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.  

Synchronous commit can be turned on and off per-user:

	ALTER ROLE <role> SET synchronous_commit = 'on';

That way, the users that require it have it, but other users do not.




view thread (10+ messages)  latest in thread

Message-ID: <209CB91E-B785-4BEB-8CAC-4A2FEF700D1B@thebuild.com>
Permalink:  ../209CB91E-B785-4BEB-8CAC-4A2FEF700D1B@thebuild.com/
Also on:    postgresql.org/message-id/209CB91E-B785-4BEB-8CAC-4A2FEF700D1B@thebuild.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: xof@thebuild.com, oleg@slapdash.com
  Subject: Re: Question: Is it possible to get the new xlog position after query execution?
  In-Reply-To: <209CB91E-B785-4BEB-8CAC-4A2FEF700D1B@thebuild.com>
  References: <CAH2JyMT=UY989a9WNcu_E1OAh7GyM1YDjhKUa-060CAH5uqhuA@mail.gmail.com> <YX78rSSOdFuyL9yi@hjp.at> <CAH2JyMR+eOAPig4xowOMGm0bMSKXBUh=sTMty4+3vaPXH2iMPQ@mail.gmail.com> <YYZsOdU3C5pSZ1um@hjp.at> <CAH2JyMS4mJ+=oR==9Q0otwXSK1bVrFPBRVMbyuktmunJr9Jofg@mail.gmail.com> <CF73DC8D-118F-4777-82E4-599EBC0FB64E@thebuild.com> <CAH2JyMQoA-a=WMu4mbjPQE-5JNMNrpkFLme_AYmwDiBKGcay=w@mail.gmail.com> <209CB91E-B785-4BEB-8CAC-4A2FEF700D1B@thebuild.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox