Re: Exit walsender before confirming remote flush in logical replication

Evgeny Voropaev <evgeny.voropaev@tantorlabs.com>

From: Evgeny Voropaev <evgeny.voropaev@tantorlabs.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2026-04-21T10:41:00Z
Lists: pgsql-hackers
> Failed on CI just now:
>
> https://cirrus-ci.com/task/6745359004729344?logs=test_world#L410
> https://api.cirrus-ci.com/v1/artifact/task/6745359004729344/testrun/build/testrun/subscription/038_walsnd_shutdown_timeout/log/regress_log_038_walsnd_shutdown_timeout
>
> [14:58:26.146](0.066s) ok 3 - have walreceiver pid 13796
> ### Stopping node "publisher" using mode fast
> # Running: pg_ctl --pgdata /home/postgres/postgres/build/testrun/subscription/038_walsnd_shutdown_timeout/data/t_038_walsnd_shutdown_timeout_publisher_data/pgdata --mode fast stop
> waiting for server to shut down........................................................................................................................... failed
> pg_ctl: server does not shut down
> # pg_ctl stop failed: 256
> # Postmaster PID for node "publisher" is 3679
> [15:00:38.178](132.032s) Bail out!  pg_ctl stop failed

+1
It still fails sporadically.
For example, It had failed here - https://cirrus-ci.com/task/5208188162670592?logs=test_world#L417

     ok 3 - have walreceiver pid 69871
     Bail out!  pg_ctl stop failed
     # test failed

and then passed here:
https://cirrus-ci.com/task/5031400161673216?logs=test_world#L340

Best regards,
Evgeny Voropaev,Tantor Labs, LLC




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Avoid blocking indefinitely while finishing walsender shutdown

  2. Add wal_sender_shutdown_timeout GUC to limit shutdown wait for replication

  3. pg_upgrade: Add --copy option

  4. Prevent possibility of panics during shutdown checkpoint.

  5. Support clean switchover.