Sample Header Ad - 728x90

How do I query the running pg_hba configuration?

25 votes
1 answer
48579 views
I want to test if a replication connection is authorized by pg_hba.conf on the provider before issuing the replication-starting command, and don't know how. (I have access to both unix and postgresql shells on both nodes) For the non-replication connection, I would connect psql using a connstring like 'host=$MASTER_IP port=5432 dbname=$DATABASE user=$DBUSER password=$DBPASSWORD' **Context:** I am writing a script to automate the setup of replication between servers, and configuration of the servers is managed through different systems/repositories (legacy reasons). Therefore, I want to test if settings are all right at each step.
Asked by victorjtfranco (353 rep)
Jul 24, 2017, 03:08 PM
Last activity: Feb 27, 2020, 11:38 AM