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 1ozlEA-0003dk-Na for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Nov 2022 20:59:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ozlE9-0001Um-39 for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Nov 2022 20:59:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozlE8-0001Ud-Kl for pgsql-hackers@lists.postgresql.org; Mon, 28 Nov 2022 20:59:44 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozlE6-0003FM-7Y for pgsql-hackers@lists.postgresql.org; Mon, 28 Nov 2022 20:59:43 +0000 Received: from bruce by momjian.us with local (Exim 4.94.2) (envelope-from ) id 1ozlE5-00G8AG-CP; Mon, 28 Nov 2022 15:59:41 -0500 Date: Mon, 28 Nov 2022 15:59:41 -0500 From: Bruce Momjian To: Bharath Rupireddy Cc: Andrey Borodin , Kyotaro Horiguchi , Laurenz Albe , PostgreSQL Hackers , SATYANARAYANA NARLAPURAM Subject: Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication Message-ID: References: <9290b55b6ae2b04e002ca9dadadd1cca09461482.camel@cybertec.at> <20220805.114916.994654810780821553.horikyota.ntt@gmail.com> <20220809.161236.1486509314201074910.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Nov 28, 2022 at 12:03:06PM +0530, Bharath Rupireddy wrote: > Thanks for verifying the behaviour. And many thanks for an off-list chat. > > FWIW, I'm planning to prepare a patch as per the below idea which is > something similar to the initial proposal in this thread. Meanwhile, > thoughts are welcome. > > 1. Disable query cancel/CTRL+C/SIGINT when a backend is waiting for > sync replication acknowledgement. > 2. Process proc die immediately when a backend is waiting for sync > replication acknowledgement, as it does today, however, upon restart, > don't open up for business (don't accept ready-only connections) > unless the sync standbys have caught up. You can prepare a patch, but it unlikely to get much interest until you get agreement on what the behavior should be. The optimal order of developer actions is: Desirability -> Design -> Implement -> Test -> Review -> Commit https://wiki.postgresql.org/wiki/Todo#Development_Process Telling us what other cloud vendors do is not sufficient. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Embrace your flaws. They make you human, rather than perfect, which you will never be.