Hi Alexander, On 1 Nov 2026, Alexander Lakhin wrote: > the wakeup can hit autovacuum worker or logical replication > launcher, not the intended client backend.
For a small fix, I'd propose restricting "init-pre-auth" to AmRegularBackendProcess(). /* Advertising of a related patch starts here */ I also prepared a variant using the filesystem-controlled wait points from [0]. Attached are two patches: 0001 rebases that interface onto current master, and 0002 uses it in 007_pre_auth.pl. The test still attaches the point through SQL and finds the client's PID in pg_stat_activity. It then waits for pg_injection_points/init-pre-auth/<pid> and removes that file to release only the intended client. Waiting for the file matters because the wait event is reported before the marker is created. The test also parks another session at the same point before starting the client, and checks that it remains blocked after the client reaches idle. This makes the multiple-waiter case deterministic. Thank you! Best regards, Andrey Borodin. [0] https://www.postgresql.org/message-id/AE31E3B7-A21B-4C1C-B75B-8D542A9DC633%40yandex-team.ru
v1-0001-Allow-filesystem-control-of-wait-injection-points.patch
Description: Binary data
v1-0002-Wake-the-pre-auth-test-s-intended-backend-by-PID.patch
Description: Binary data
