From: | Jing Wang <jingwangian(at)gmail(dot)com> |
---|---|
To: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Libpq support to connect to standby server as priority |
Date: | 2018-01-04 22:17:12 |
Message-ID: | CAF3+xMJnijOmLb8mhwjY7x0tWXGQDdRtSHKe7sN47FT_0T-f_g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Enclosed please find the patch that the libpq support 'prefer-read'
feature.
If the *target_session_attrs* is set to 'prefer-read', the patch will
connect to server and send 'SHOW transaction_read_only' query to check the
server being 'read-only' or not. If server is 'read-write' then it will try
next server address. If all connections for 'read-only' get failed it will
try to connect to the master server.
--
Regards,
Jing Wang
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
libpq_support_perfer-read_001.patch | application/octet-stream | 9.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2018-01-04 22:35:42 | Re: Finalizing logical replication limitations as well as potential features |
Previous Message | Remi Colinet | 2018-01-04 22:15:59 | Re: [Patch] Make block and file size for WAL and relations defined at cluster creation |