Re: FDW, connections, master v replica

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: "Godfrin, Philippe E" <philippe(dot)godfrin(at)nov(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: FDW, connections, master v replica
Date: 2021-05-18 14:44:33
Message-ID: 49ed5b6a7a44f245676db39d8c6c2b1f55035eac.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, 2021-05-18 at 13:57 +0000, Godfrin, Philippe E wrote:
> Does anyone know of a method to define a foreign server to point to a patroni
> cluster of 2 postgres cluster instances and be able to select between the master for RW and the replica for RO?

Use the "target_session_attrs" connection parameter.

It can be used to always connect to the primary, and from v14 on
it can also be used to preferably connect to the standby.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Godfrin, Philippe E 2021-05-18 16:13:10 RE: [EXTERNAL] Re: FDW, connections, master v replica
Previous Message Vijaykumar Jain 2021-05-18 14:27:41 Re: FDW, connections, master v replica