Re: Libpq support to connect to standby server as priority

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-28 13:16:03
Message-ID: CAJrrPGeM4NzFOjiLKmcQ+wAN=CAJDdUw3ar2m_Q4EZsZYrUdRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 27, 2019 at 5:17 PM Tsunakawa, Takayuki <
tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> wrote:

> I've looked through 0004-0007. I've only found the following:
>
> (5) 0005
> With this read-only option type, application can connect to
> connecting to a read-only server in the list of hosts, in case
> if there is any read-only servers available, the connection
> attempt fails.
>
> "connecting to" can be removed.
>
> in case if there is any read-only servers
> -> If There's no read only server
>

Thanks for the review.

I corrected all the comments that are raised by you and attached updated
version of patches
along with implementation of WIP in_recovery GUC_REPORT variable. This
patch has used some
of the implementations that are provided earlier in thread [1].

During the implementation of in_recovery configuration variable, I see a
lot of code addition just
for this variable, is this worth it?

[1] -
https://www.postgresql.org/message-id/2239254.dtfY1H9x0t%40hammer.magicstack.net

Regards,
Haribabu Kommi
Fujitsu Australia

Attachment Content-Type Size
0001-Restructure-the-code-to-remove-duplicate-code.patch application/x-patch 6.4 KB
0002-New-TargetSessionAttrsType-enum.patch application/x-patch 3.0 KB
0003-Make-transaction_read_only-as-GUC_REPORT-varaible.patch application/x-patch 9.6 KB
0004-New-prefer-read-target_session_attrs-type.patch application/x-patch 15.4 KB
0005-New-read-only-target_session_attrs-type.patch application/x-patch 7.7 KB
0006-Primary-prefer-standby-and-standby-options.patch application/x-patch 18.9 KB
0007-New-function-to-rejecting-the-checked-write-connecti.patch application/x-patch 6.2 KB
0008-Server-recovery-mode-handling.patch application/x-patch 21.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fred .Flintstone 2019-03-28 13:18:27 Re: PostgreSQL pollutes the file system
Previous Message Andrew Dunstan 2019-03-28 13:10:51 Re: jsonpath