Re: [PATCH] Write Notifications Through WAL

From: Rishu Bagga <rishu(dot)postgres(at)gmail(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Arseniy Mukhin <arseniy(dot)mukhin(dot)dev(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Joel Jacobson <joel(at)compiler(dot)org>, Matheus Alcantara <matheusssilv97(at)gmail(dot)com>
Subject: Re: [PATCH] Write Notifications Through WAL
Date: 2025-11-25 01:01:58
Message-ID: CAK80=jgom1QLy=R3JaHpEqJMBwYKxOdjiDX4qywJ9G8-pgWySw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all, following up with a new rebased patch.

> > On Fri, Oct 17, 2025 at 6:33 AM Arseniy Mukhin
> > <arseniy(dot)mukhin(dot)dev(at)gmail(dot)com> wrote:
> > > Also the comment
> > >
> > > /*----------
> > > * Get snapshot we'll use to decide which xacts are still in progress.
> > > * This is trickier than it might seem, because of race conditions.
> > >
> > > seems to still be relevant, so I think it's worth keeping.
> > >
> > >
> >
> > Reverted to the original logic and restored the comment in the new patch.

Looks like the v8 patch I sent in the last email didn't actually
address this concern. I must've made a
git blunder at some point and didn't double check the patch before
sending. The new patch definitely
addresses it. Apologies for the oversight.

>On Fri, Nov 20, 2025 at 3:22 PM Masahiko Sawada
><sawada(dot)mshk(at)gmail(dot)com> wrote:

> I've briefly looked through the v8 patch and have a comment and a question:
>
> async.c has a great explanation for its implementation at the
> beginning of the file. The patch needs to update the comment too.
>

Updated the comment to describe the new mechanism accurately.

> ---
> @@ -3100,7 +3100,7 @@ step s1_slru_check_stats:
>
> ?column?
> --------
> -t
> +f
> (1 row)
>
> The patch includes such changes in the expected file. What caused these changes?
>

These tests were checking to verify that adding large notifications
would affect pg_stat_slru
by causing new slru pages to be initialized. Now that we write
notifications to WAL, and only
write one compact entry to the notify slru queue, we don't expect
there to be a new page to
be zeroed out, regardless of the size or the number of the
notifications for a single transaction.

> Regards,
>
> --
> Masahiko Sawada
> Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
notify-through-wal-v9.patch application/octet-stream 81.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-11-25 01:23:18 Re: Partial hash index is not used for implied qual.
Previous Message David Rowley 2025-11-25 00:49:16 Re: Partial hash index is not used for implied qual.