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 1kirSe-0003U8-MU for pgsql-bugs@arkaria.postgresql.org; Sat, 28 Nov 2020 04:03:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kirSd-00006R-JN for pgsql-bugs@arkaria.postgresql.org; Sat, 28 Nov 2020 04:03:47 +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 1kirSd-00006G-D8 for pgsql-bugs@lists.postgresql.org; Sat, 28 Nov 2020 04:03:47 +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 1kirSY-0000vn-VG for pgsql-bugs@lists.postgresql.org; Sat, 28 Nov 2020 04:03:46 +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 0AS43eMd744928; Fri, 27 Nov 2020 23:03:40 -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: <20201128035906.GA556656@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> Comments: In-reply-to Noah Misch message dated "Fri, 27 Nov 2020 19:59:06 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <744926.1606536220.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 27 Nov 2020 23:03:40 -0500 Message-ID: <744927.1606536220@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Noah Misch writes: > ... agreed. In general, recycling SLRU space entails three steps that s= hall > not overlap: > 1. Stop reading data in the space, regulated by some "logical tail". > 2. Unlink files wholly within the bounds of the space. > 3. Start writing data into the space, regulated by some "physical tail" = (most > often called a "stop limit"). Check. > Commit d4031d7 fixed overlap of (2) and (3). For pg_notify, though, it > introduced overlap of (1) and (2). I've now checked the other SLRUs for > similar problems, but I found nothing urgent: Good, I was wondering if we had any similar issues elsewhere. > I think we don't yet have the right name here, seeing QUEUE_TAIL_PAGE !=3D > QUEUE_POS_PAGE(QUEUE_TAIL) sounds paradoxical, yet happens regularly. H= ow > about naming it QUEUE_STOP_PAGE? Hmm, it's not very clear what "stop" means here. What do you think of QUEUE_OLDEST_PAGE? regards, tom lane