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 1fzjbt-0002TR-Mv for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Sep 2018 14:25:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzjbr-0003LD-LN for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Sep 2018 14:25:43 +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 1fzjbr-0003L5-BC for pgsql-hackers@lists.postgresql.org; Tue, 11 Sep 2018 14:25:43 +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 1fzjbo-0005wm-QG for pgsql-hackers@lists.postgresql.org; Tue, 11 Sep 2018 14:25:42 +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 w8BEPZvI022380; Tue, 11 Sep 2018 10:25:35 -0400 From: Tom Lane To: Simon Riggs cc: Robert Haas , Jeff Janes , PostgreSQL Hackers Subject: Re: StandbyAcquireAccessExclusiveLock doesn't necessarily In-reply-to: References: <6202.1536359835@sss.pgh.pa.us> Comments: In-reply-to Simon Riggs message dated "Tue, 11 Sep 2018 10:54:16 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22378.1536675935.1@sss.pgh.pa.us> Date: Tue, 11 Sep 2018 10:25:35 -0400 Message-ID: <22379.1536675935@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Simon Riggs writes: > On 10 September 2018 at 19:16, Robert Haas wrote: >> On Fri, Sep 7, 2018 at 6:37 PM, Tom Lane wrote: >>> So my inclination is to remove the reportMemoryError = false parameter, >>> and just let an error happen in the unlikely situation that we hit OOM >>> for the lock table. >> Wouldn't that take down the entire cluster with no restart? > Please explain why you think that would be with no restart. More to the point, what are our alternatives, and how much can we really improve it? If the WAL stream requires more concurrent AELs than the standby's lock table can hold, there isn't going to be any solution short of manual intervention to increase the standby's max_locks_per_transaction. The point of the previous coding here was that perhaps there's some range of number-of-locks-needed where kicking hot-standby queries off of locks would allow recovery to proceed. However, it is (as far as I know) unproven that that actually works, let alone is effective enough to justify maintaining very-hard-to-test code for. The field demand for such behavior can be measured by the number of complaints we've had since breaking it in 9.6, namely zero. So no, I do not want to re-implement and maintain that behavior on the strength of just a guess that sometimes it might be useful. If somebody else feels a burning passion for it, they can do the work --- but I'd be inclined to argue that it'd be a HEAD-only performance improvement, not a back-patchable bug fix. regards, tom lane