RE: Libpq support to connect to standby server as priority

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: 'Haribabu Kommi' <kommi(dot)haribabu(at)gmail(dot)com>
Cc: 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>, Robert Haas <robertmhaas(at)gmail(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-01-21 06:48:14
Message-ID: 0A3221C70F24FB45833433255569204D1FB6C737@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Haribabu Kommi [mailto:kommi(dot)haribabu(at)gmail(dot)com]
> Thanks for finding out the problem, how about the following way of checking
> for prefer-read/prefer-standby.
>
> 1. (default_transaction_read_only = true and recovery = true)
>
> 2. If none of the host satisfies the above scenario, then recovery = true
> 3. Last check is for default_transaction_read_only = true

That would be fine. But as I mentioned in another mail, I think "get read-only session" and "connect to standby" differ. So I find it better to separate parameters for those request; target_session_attr and target_server_type.

Regards
Takayuki Tsunakawa

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tsunakawa, Takayuki 2019-01-21 07:12:41 RE: Protect syscache from bloating with negative cache entries
Previous Message Pavel Stehule 2019-01-21 06:33:52 Re: PostgreSQL vs SQL/XML Standards