I noticed that the async-notify test results in log messages like these:
LOG: could not send data to client: Broken pipe
FATAL: connection to client lost
This is because it unceremoniously disconnects a client session that is
about to have some NOTIFY messages delivered to it. Such log messages
during a regression test might well cause people to go looking for a
problem that doesn't really exist (it did cause me to waste some time that
way). We can shut it up by adding an UNLISTEN command to session teardown.
Patch HEAD only; this doesn't seem significant enough to back-patch.
session "listener"
step "listen" { LISTEN a; }
step "begin" { BEGIN; }
-teardown { ROLLBACK; }
+teardown { ROLLBACK; UNLISTEN *; }
session "notifier"
step "check" { SELECT pg_notification_queue_usage() > 0 AS nonzero; }