Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzl8t-0006kq-Bo for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Sep 2018 16:03:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzl8q-0004kH-Qm for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Sep 2018 16:03:52 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzl8q-0004k4-G9 for pgsql-hackers@lists.postgresql.org; Tue, 11 Sep 2018 16:03:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fzl8o-0000kE-48 for pgsql-hackers@lists.postgresql.org; Tue, 11 Sep 2018 16:03:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w8BG3iB1028428; Tue, 11 Sep 2018 12:03:44 -0400 From: Tom Lane To: Andres Freund cc: Simon Riggs , Robert Haas , Jeff Janes , PostgreSQL Hackers Subject: Re: StandbyAcquireAccessExclusiveLock doesn't necessarily In-reply-to: <20180911152929.7xo4qgb3eyz6djfu@alap3.anarazel.de> References: <6202.1536359835@sss.pgh.pa.us> <22379.1536675935@sss.pgh.pa.us> <20180911152929.7xo4qgb3eyz6djfu@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 11 Sep 2018 08:29:29 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28426.1536681824.1@sss.pgh.pa.us> Date: Tue, 11 Sep 2018 12:03:44 -0400 Message-ID: <28427.1536681824@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-09-11 16:23:44 +0100, Simon Riggs wrote: >> It's hard to see how any reasonable workload would affect the standby. And >> if it did, you'd change the parameter and restart, just like you already >> have to do if someone changes max_connections on master first. > Isn't one of the most common ways to run into "out of shared memory" > "You might need to increase max_locks_per_transaction." to run pg_dump? > And that's pretty commonly done against standbys? If the startup process has acquired enough AELs to approach locktable full, any concurrent pg_dump has probably failed already, because it'd be trying to share-lock every table and so would have a huge conflict cross-section; it's hard to believe it wouldn't get cancelled pretty early in that process. (Again, if you think this scenario is probable, you have to explain the lack of field complaints.) The case where this behavior might really be of some use, IMO, is the lots-of-small-transactions scenario --- but we lack the stop-new-locks mechanism that would be needed to make the behavior actually effective for that case. regards, tom lane