Re: Can I tell libpq to connect to the primary?

From: Christian Ramseyer <rc(at)networkz(dot)ch>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Can I tell libpq to connect to the primary?
Date: 2020-04-23 06:54:35
Message-ID: 77fdd49c-2977-6e68-1206-fade93701d72@networkz.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 22.04.20 21:10, Christian Ramseyer wrote:
>
> I see that in pgjdbc there are additional options for targetServerType =
> any, primary, secondary, preferSlave and preferSecondary[2]. However
> this seems to be java-specific and not implemented in libpq? Is there a
> way to get this behaviour in PHP/Psycopg/Perl DBI?
>

Never mind, after RTFM'ing to the very end of
https://www.postgresql.org/docs/current/libpq-connect.html I have
discovered target_session_attrs=read-write|any which seems to do exactly
what I want.

Cheers
Christian

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Knecht 2020-04-23 08:13:39 pg11: Query using index, but only for half the partitions
Previous Message Peter J. Holzer 2020-04-22 23:03:22 Re: How do work tercile, percentile & funcion percentile_cont() ?