Libpq support to connect to standby server as priority

From: Jing Wang <jingwangian(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Libpq support to connect to standby server as priority
Date: 2018-01-04 04:20:52
Message-ID: CAF3+xMJRdKWBtnat4akRNnLL-zQn=GJ8UYj7zNKb_+6KcyuvYA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2018-01-04 05:03:18 Re: [HACKERS] Pluggable storage
Previous Message Amit Kapila 2018-01-04 03:54:41 Re: Observations in Parallel Append