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 1kj5gp-0000NV-Gh for pgsql-bugs@arkaria.postgresql.org; Sat, 28 Nov 2020 19:15:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kj5go-0004Ru-FA for pgsql-bugs@arkaria.postgresql.org; Sat, 28 Nov 2020 19:15:22 +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 1kj5go-0004Rn-98 for pgsql-bugs@lists.postgresql.org; Sat, 28 Nov 2020 19:15:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kj5gh-0006Pp-B7 for pgsql-bugs@lists.postgresql.org; Sat, 28 Nov 2020 19:15: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 0ASJFB1b901795; Sat, 28 Nov 2020 14:15:11 -0500 From: Tom Lane To: Noah Misch cc: Gustavsson Mikael , pgsql-bugs@lists.postgresql.org, Svensson Peter , Almen Anders Subject: Re: SV: Problem with pg_notify / listen In-reply-to: <20201128041001.GB556656@rfd.leadboat.com> References: <1b8561412e8a4f038d7a491c8b922788@smhi.se> <704331.1606490493@sss.pgh.pa.us> <6c10dcdd2eb64bbab4814e4f2abd5ab4@smhi.se> <7a0df07fb3f94dfe80839942ab5993c7@smhi.se> <716909.1606498665@sss.pgh.pa.us> <730247.1606515208@sss.pgh.pa.us> <20201128035906.GA556656@rfd.leadboat.com> <744927.1606536220@sss.pgh.pa.us> <20201128041001.GB556656@rfd.leadboat.com> Comments: In-reply-to Noah Misch message dated "Fri, 27 Nov 2020 20:10:01 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <901793.1606590911.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 28 Nov 2020 14:15:11 -0500 Message-ID: <901794.1606590911@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Noah Misch writes: > On Fri, Nov 27, 2020 at 11:03:40PM -0500, Tom Lane wrote: >> Hmm, it's not very clear what "stop" means here. What do you think of >> QUEUE_OLDEST_PAGE? > QUEUE_OLDEST_PAGE is fine. I like it a little less than QUEUE_STOP_PAGE= , > because oldestClogXid is a logical tail, and QUEUE_OLDEST_PAGE would be = a > physical tail. I went with QUEUE_STOP_PAGE. In further testing, I noted that the patch as I had it re-introduced the symptom that 8b7ae5a82 fixed, that running "make installcheck" twice in a row causes the async-notify isolation test to fail. That's because I'd changed asyncQueueUsage() to measure the distance back to the physical tail, which isn't stable because we only truncate after crossing an SLRU segment boundary. So I reverted it to measuring the distance to QUEUE_TAIL. You could argue either way about which definition is more useful to end users, perhaps; but in practice the difference should usually be too small to matter, for everyone except regression tests that are looking for distance exactly zero. Anyhow, pushed with that fix. Mikael, it appears that you have three options: revert to 11.9 until 11.11 is out, restart your server every time it approaches notify-queue-full, or apply this patch: https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dpatch;h=3D40f2fb= e71ad615a2bcaaf5b840ccb9329e4378aa regards, tom lane