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 04:03:40
Message-ID: 744927.1606536220@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:
> ... agreed. In general, recycling SLRU space entails three steps that shall
> 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 !=
> QUEUE_POS_PAGE(QUEUE_TAIL) sounds paradoxical, yet happens regularly. How
> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Noah Misch 2020-11-28 04:10:01 Re: SV: Problem with pg_notify / listen
Previous Message Noah Misch 2020-11-28 03:59:06 Re: SV: Problem with pg_notify / listen

Browse pgsql-general by date

  From Date Subject
Next Message Noah Misch 2020-11-28 04:10:01 Re: SV: Problem with pg_notify / listen
Previous Message Noah Misch 2020-11-28 03:59:06 Re: SV: Problem with pg_notify / listen