Improve the connection failure error messages

Nisha Moond <nisha.moond412@gmail.com>

From: Nisha Moond <nisha.moond412@gmail.com>
To: pgsql-hackers@lists.postgresql.org
Cc: Nisha Moond <nisha.moond412@gmail.com>
Date: 2024-01-11T08:54:20Z
Lists: pgsql-hackers

Attachments

Hi Hackers,

Various sections of the code utilize the walrcv_connect() function,
employed by various processes such as walreceiver, logical replication
apply worker, etc., to establish connections with other hosts.
Presently, in case of connection failures, the error message lacks
information about the specific process attempting to connect and
encountering the failure.

The provided patch enhances error messages for such connection
failures, offering more details on the processes that failed to
establish a connection.

--
Thanks,
Nisha

Commits

  1. Improve logical replication connection-failure messages.

  2. Fix a random failure in 038_save_logical_slots_shutdown.pl.

  3. Add a failover option to subscriptions.