Libpq support to connect to standby server as priority - Mailing list pgsql-hackers

From Jing Wang
Subject Libpq support to connect to standby server as priority
Date
Msg-id CAF3+xMJRdKWBtnat4akRNnLL-zQn=GJ8UYj7zNKb_+6KcyuvYA@mail.gmail.com
Whole thread Raw
Responses RE: Libpq support to connect to standby server as priority
Re: Libpq support to connect to standby server as priority
List pgsql-hackers
Hi Hackers,

This is a proposal that let libpq support 'prefer-read' option in target_session_attrs in pg_conn. The 'prefer-read' means the libpq will try to connect to a 'read-only' server firstly from the multiple server addresses. If failed to connect to the 'read-only' server then it will try to connect to the 'read-write' server.

By providing this feature the application can have the opportunity to connect to the standby server firstly if failed then connect to master server without caring the sequence of the server addresses provided to the libpq.

The 'read-only' server means Standby Server
The 'read-write' server means Master Server support to 'read-write'


--
Regards,
Jing Wang
Fujitsu Australia

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Observations in Parallel Append
Next
From: Haribabu Kommi
Date:
Subject: Re: [HACKERS] Pluggable storage