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

From Michael Paquier
Subject Re: Libpq support to connect to standby server as priority
Date
Msg-id 20181115091351.GH1374@paquier.xyz
Whole thread Raw
In response to Re: Libpq support to connect to standby server as priority  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Thu, Nov 15, 2018 at 05:14:33PM +0900, Michael Paquier wrote:
> JDBC has its own set of options with targetServerType: master, slave,
> secondary, preferSlave and preferSecondary.  What's proposed here is
> preferSlave and what we would miss is slave at the end.

So thinking a couple of extra minutes on this one, I am wondering if it
would be better to close completely the gap with two patches:
1) Get "read-only" done first, which uses most of the existing
infrastructure.  That seems simple enough.
2) Get "prefer-read" and "prefer-write", which need some new
infrastructure to track the last preferred connection depending on what
the client wants.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [PATCH] XLogReadRecord returns pointer to currently read page
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe perprocess