Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkA6I-0003RX-Ro for pgsql-general@arkaria.postgresql.org; Mon, 08 Nov 2021 19:14:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mkA6H-0001It-JE for pgsql-general@arkaria.postgresql.org; Mon, 08 Nov 2021 19:14:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkA6H-0001Ik-8n for pgsql-general@lists.postgresql.org; Mon, 08 Nov 2021 19:14:37 +0000 Received: from smtp72.iad3a.emailsrvr.com ([173.203.187.72]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkA6A-0004Y5-To for pgsql-general@lists.postgresql.org; Mon, 08 Nov 2021 19:14:36 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp18.relay.iad3a.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id D6B1E20D66; Mon, 8 Nov 2021 14:14:28 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Question: Is it possible to get the new xlog position after query execution? From: Christophe Pettus In-Reply-To: Date: Mon, 8 Nov 2021 11:13:25 -0800 Cc: pgsql-general@lists.postgresql.org X-Mailbutler-Message-Id: 10FD1711-9D77-4952-96BF-2ED8350D3328 Content-Transfer-Encoding: quoted-printable Message-Id: <209CB91E-B785-4BEB-8CAC-4A2FEF700D1B@thebuild.com> References: To: Oleg Serov X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Classification-ID: 8d1faa26-ebf4-457e-b1ac-d232d3900a8d-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Nov 8, 2021, at 10:03, Oleg Serov 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. =20 Synchronous commit can be turned on and off per-user: ALTER ROLE SET synchronous_commit =3D 'on'; That way, the users that require it have it, but other users do not.=