Re: Libpq support to connect to standby server as priority

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Greg Nancarrow <gregn4422(at)gmail(dot)com>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jing Wang <jingwangian(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Elvis Pranskevichus <elprans(at)gmail(dot)com>
Subject: Re: Libpq support to connect to standby server as priority
Date: 2019-12-26 20:17:45
Message-ID: CADK3HHLo-jTh4S1PYd7Qx5t8hscH-6emBy9fWFv1dUwhPzyTzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 26 Dec 2019 at 15:07, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> On 2019-Oct-01, Greg Nancarrow wrote:
>
> > On Wed, Sep 11, 2019 at 10:17 AM Alvaro Herrera from 2ndQuadrant
> > <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> > >
> > > Oh, oops. Here they are then.
> >
> > With the permission of the original patch author, Haribabu Kommi, I’ve
> > rationalized the existing 8 patches into 3 patches, merging patches
> > 1-5 and 6-7, and tidying up some documentation and code comments. I
> > also rebased them to the latest PG12 source code (as of October 1,
> > 2019). The patch code itself is the same, except for some version
> > checks that I have updated to target the features for PG13 instead of
> > PG12.
>
> I've spent some time the last few days going over these patches and the
> prior discussion.
>
> I'm not sure I understand why we end up with "prefer-read" in addition
> to "prefer-standby" (and similar seeming redundancy between "primary"
> and "read-write"). Do we really need more than one way to identify
> hosts' roles? It seems 0001 adds the "prefer-read" modes by checking
> transaction_read_only, and later 0002 adds the "prefer-standby" modes by
> checking in_recovery. I'm not sure that we're serving our users very
> well by giving them choice that ends up being confusing. In other words
> I think we should do only one of these things, not both. Maybe merge
> 0001 and 0002 in a single patch, and get rid of redundant modes.
>
> There were other comments that I think went largely unaddressed, such as
> the point that the JDBC driver seems to offer a different syntax for the
> configuration, and should we offer a compatibility shim of some sort.
> (Frankly, I don't think we need to stress over this too much, but it
> seems that it wasn't even discussed.)
>

We seem to ignore prior work here I agree. It would be wonderful if there
were only one
syntax. Is it too late to change the syntax for this patch as that ship has
sailed for JDBC

>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-12-26 20:29:56 Re: Calling PLpgSQL function with composite type fails with an error: "ERROR: could not open relation with OID ..."
Previous Message Alvaro Herrera 2019-12-26 20:15:13 Re: Libpq support to connect to standby server as priority