Re: SV: Problem with pg_notify / listen

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Gustavsson Mikael <mikael(dot)gustavsson(at)smhi(dot)se>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Svensson Peter <peter(dot)svensson(at)smhi(dot)se>, Almen Anders <anders(dot)almen(at)smhi(dot)se>
Subject: Re: SV: Problem with pg_notify / listen
Date: 2020-11-28 19:15:11
Message-ID: 901794.1606590911@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Noah Misch <noah(at)leadboat(dot)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. 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=postgresql.git;a=patch;h=40f2fbe71ad615a2bcaaf5b840ccb9329e4378aa

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2020-11-29 00:48:32 Re: BUG #16746: [PG12.5 psql] Password ignored by connect meta-command
Previous Message Noah Misch 2020-11-28 04:10:01 Re: SV: Problem with pg_notify / listen

Browse pgsql-general by date

  From Date Subject
Next Message mark armon 2020-11-29 05:32:26 Re: pgdump version mismatch error. server version: 13.0; pg_dump version: 12.4
Previous Message Hemil Ruparel 2020-11-28 16:46:45 Re: How to debug authentication issues in Postgres