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 1kjdA6-0003XG-0A for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Nov 2020 06:59:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kjdA4-0002dh-Va for pgsql-bugs@arkaria.postgresql.org; Mon, 30 Nov 2020 06:59:48 +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 1kjdA4-0002ZL-GT for pgsql-bugs@lists.postgresql.org; Mon, 30 Nov 2020 06:59:48 +0000 Received: from smtpout1.smhi.se ([2001:67c:274:5501::30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjdA0-00089e-Et for pgsql-bugs@lists.postgresql.org; Mon, 30 Nov 2020 06:59:47 +0000 Received: from winserv743.ad.smhi.se (winserv743.ad.smhi.se [172.16.6.38]) by smtpout1.smhi.se (Postfix) with ESMTPS id 7D05A1095093; Mon, 30 Nov 2020 06:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smhi.se; s=20180112; t=1606719577; bh=M7kHl4Da7mMD+Kugf0f+KtZ0FXiW+kCfTwc1EEbz8E0=; h=From:To:CC:Subject:Date:References:In-Reply-To:From; b=perZp6bpnlu8vFjjFF9T94Cgul1aq4BGOsrzm8YKJgaoUEHtpLrrmALmCX8WzCjwU RKV+j4ZOrbu29CZyF9px0OpdtdtKHHkOX7S159DAzBYKcUghCBDGqwWXUXs9lyjhfD Q5gFx3nWRkccGH+zjq+c9sDBE2NjEk5NJPbMC4Pc= Received: from winserv744.ad.smhi.se (172.16.6.35) by winserv743.ad.smhi.se (172.16.6.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 30 Nov 2020 07:59:37 +0100 Received: from winserv744.ad.smhi.se ([fe80::c19c:d0f0:5830:a72b]) by winserv744.ad.smhi.se ([fe80::c19c:d0f0:5830:a72b%9]) with mapi id 15.01.2106.004; Mon, 30 Nov 2020 07:59:37 +0100 From: Gustavsson Mikael To: Tom Lane , Noah Misch CC: "pgsql-bugs@lists.postgresql.org" , Svensson Peter , Almen Anders , Karlsson Peter Subject: SV: SV: Problem with pg_notify / listen Thread-Topic: SV: Problem with pg_notify / listen Thread-Index: AQHWxLzC/H89OzBnPkSJXMLfqEVBDqncB7yAgAAQ7GqAAAHjjYAAEz+AgABNCQCAAGCSAIAAAUYAgAABxoCAAPzngIACZi8g Date: Mon, 30 Nov 2020 06:59:37 +0000 Message-ID: <0680bb40822c4dd48b4e9025f8bb25b4@smhi.se> 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>,<901794.1606590911@sss.pgh.pa.us> In-Reply-To: <901794.1606590911@sss.pgh.pa.us> Accept-Language: sv-SE, en-US Content-Language: sv-SE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.122.1.210] Content-Type: multipart/alternative; boundary="_000_0680bb40822c4dd48b4e9025f8bb25b4smhise_" MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_0680bb40822c4dd48b4e9025f8bb25b4smhise_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Great! I will talk to the rest of the team on which path to take. And thank you for finding and fixing this so quickly! kr Mikael Gustavsson SMHI ________________________________ Fr=E5n: Tom Lane Skickat: den 28 november 2020 20:15 Till: Noah Misch Kopia: Gustavsson Mikael; pgsql-bugs@lists.postgresql.org; Svensson Peter; = Almen Anders =C4mne: Re: SV: Problem with pg_notify / listen 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=3D40f2fbe= 71ad615a2bcaaf5b840ccb9329e4378aa regards, tom lane --_000_0680bb40822c4dd48b4e9025f8bb25b4smhise_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Great!


I will talk to the rest of the team on which path to take.


And thank you for finding and fixing this so quickly!


kr

Mikael Gustavsson

SMHI




Fr=E5n: Tom Lane <tgl@= sss.pgh.pa.us>
Skickat: den 28 november 2020 20:15
Till: Noah Misch
Kopia: Gustavsson Mikael; pgsql-bugs@lists.postgresql.org; Svensson = Peter; Almen Anders
=C4mne: Re: SV: Problem with pg_notify / listen
 
Noah Misch <noah@leadboat.com> writes:
> On Fri, Nov 27, 2020 at 11:03:40PM -0500, Tom Lane wrote:
>> Hmm, it's not very clear what "stop" means here.  W= hat do you think of
>> QUEUE_OLDEST_PAGE?

> QUEUE_OLDEST_PAGE is fine.  I like it a little less than QUEUE_ST= OP_PAGE,
> because oldestClogXid is a logical tail, and QUEUE_OLDEST_PAGE would b= e 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" tw= ice
in a row causes the async-notify isolation test to fail.  That's becau= se
I'd changed asyncQueueUsage() to measure the distance back to the physical<= br> tail, which isn't stable because we only truncate after crossing an
SLRU segment boundary.  So I reverted it to measuring the distance to<= br> 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<= br> is out, restart your server every time it approaches notify-queue-full, or<= br> apply this patch:

https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dpat= ch;h=3D40f2fbe71ad615a2bcaaf5b840ccb9329e4378aa

            &nb= sp;           regards, to= m lane
--_000_0680bb40822c4dd48b4e9025f8bb25b4smhise_--