From: | Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com> |
---|---|
To: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
Cc: | 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>, Dave Cramer <pg(at)fastcrypt(dot)com>, Jing Wang <jingwangian(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Libpq support to connect to standby server as priority |
Date: | 2019-03-21 06:25:49 |
Message-ID: | CAJrrPGdWKM1Av3ADX2_YL24PGok6iH3n1oQzjhtUs1nrDuCNww@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 20, 2019 at 5:01 PM Tsunakawa, Takayuki <
tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> wrote:
> From: Robert Haas [mailto:robertmhaas(at)gmail(dot)com]
> > I really dislike having both target_sesion_attrs and
> > target_server_type. It doesn't solve any actual problem. master,
> > slave, prefer-save, or whatever you like could be put in
> > target_session_attrs just as easily, and then we wouldn't end up with
> > two keywords doing closely related things. 'master' is no more or
> > less a server attribute than 'read-write'.
>
> Hmm, that may be OK. At first, I felt it strange to treat the server type
> (primary or standby) as a session attribute. But we can see the server
> type as one attribute in a sense that a session is established for. I'm
> inclined to agree with:
>
> target_session_attr = {any | read-write | read-only | prefer-read |
> primary | standby | prefer-standby}
>
Thanks for your suggestions.
Based on the above new options that can be added to target_session_attrs,
primary - it is just an alias to the read-write option.
standby, prefer-standby - These options should check whether server is
running in recovery mode or not
instead of checking whether server accepts read-only connections or not?
Regards,
Haribabu Kommi
Fujitsu Australia
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-03-21 07:11:42 | Re: Offline enabling/disabling of data checksums |
Previous Message | Haribabu Kommi | 2019-03-21 06:17:33 | Re: Transaction commits VS Transaction commits (with parallel) VS query mean time |