Re: On login trigger: take three - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: On login trigger: take three
Date
Msg-id CAPpHfdve2Z7e+MsHNk=ddYk-AUwjs7=v9fyMdoRV=Ooysfqo5g@mail.gmail.com
Whole thread Raw
In response to Re: On login trigger: take three  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: On login trigger: take three  (Alexander Lakhin <exclusion@gmail.com>)
List pgsql-hackers
On Mon, Jan 15, 2024 at 11:29 AM Daniel Gustafsson <daniel@yesql.se> wrote:
> > On 13 Jan 2024, at 17:00, Alexander Lakhin <exclusion@gmail.com> wrote:
>
> > I suspected that this failure was caused by autovacuum, and I've managed to
> > reproduce it without Valgrind or slowing down a machine.
>
> This might be due to the fact that the cleanup codepath to remove the flag when
> there is no login event trigger doesn't block on locking pg_database to avoid
> stalling connections.  There are no guarantees when the flag is cleared, so a
> test like this will always have potential to be flaky it seems.

+1
Thank you, Daniel.  I think you described everything absolutely
correctly.  As I wrote upthread, it doesn't seem much could be done
with this, at least within a regression test.  So, I just removed this
query from the test.

------
Regards,
Alexander Korotkov



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: Assertion failure with epoch when replaying standby records for 2PC
Next
From: Peter Geoghegan
Date:
Subject: Re: Emit fewer vacuum records by reaping removable tuples during pruning