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 1myhFD-00020u-2s for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Dec 2021 21:27:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1myhEg-0002HV-A6 for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Dec 2021 21:27:22 +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 1myhEg-0002HM-13 for pgsql-hackers@lists.postgresql.org; Sat, 18 Dec 2021 21:27:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1myhEZ-0001sS-Qi for pgsql-hackers@lists.postgresql.org; Sat, 18 Dec 2021 21:27:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1BILRCAg1637477; Sat, 18 Dec 2021 16:27:12 -0500 From: Tom Lane To: Tomas Vondra cc: PostgreSQL Hackers Subject: Re: sequences vs. synchronous replication In-reply-to: <7869761b-fdc7-6f7d-dc95-9ba8315a8ecf@enterprisedb.com> References: <712cad46-a9c8-1389-aef8-faf0203c9be9@enterprisedb.com> <1452362.1639803168@sss.pgh.pa.us> <38a6a779-ee8d-de3c-fbd7-709285be88fa@enterprisedb.com> <7869761b-fdc7-6f7d-dc95-9ba8315a8ecf@enterprisedb.com> Comments: In-reply-to Tomas Vondra message dated "Sat, 18 Dec 2021 21:45:09 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1637475.1639862832.1@sss.pgh.pa.us> Date: Sat, 18 Dec 2021 16:27:12 -0500 Message-ID: <1637476.1639862832@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Tomas Vondra writes: > Here's a PoC demonstrating this idea. I'm not convinced it's the right > way to deal with this - it surely seems more like a duct tape fix than a > clean solution. But it does the trick. I was imagining something a whole lot simpler, like "don't try to cache unused sequence numbers when wal_level > minimal". We've accepted worse performance hits in that operating mode, and it'd fix a number of user complaints we've seen about weird sequence behavior on standbys. regards, tom lane