RE: [EXTERNAL] Re: Client not able to pick up - Mailing list pgsql-admin

From Wetmore, Matthew (CTR)
Subject RE: [EXTERNAL] Re: Client not able to pick up
Date
Msg-id PH0PR12MB549909534288BC36356DB74FF5DD2@PH0PR12MB5499.namprd12.prod.outlook.com
Whole thread Raw
In response to Re: Client not able to pick up  (Scott Ribe <scott_ribe@elevated-dev.com>)
List pgsql-admin
My guess is that in their pg_admin config, they are still connecting to the server, not the HAPROXY.

If you connect to the proxy, you will always get the leader.  If you connect to the server in pg_admin, you'll get
that.

-----Original Message-----
From: Scott Ribe <scott_ribe@elevated-dev.com> 
Sent: Wednesday, July 3, 2024 11:43 AM
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: [EXTERNAL] Re: Client not able to pick up

How are you using HAProxy??? PostgreSQL can only have one master taking writes. So if you're sending write transactions
toHAProxy to split among master & replicas, then yeah, there's your problem.
 

--
Scott Ribe
scott_ribe@elevated-dev.com

https://urldefense.com/v3/__https://www.linkedin.com/in/scottribe/__;!!GFE8dS6aclb0h1nkhPf9!-cUmWeivyjb9sLhqVyIeglhtKuj230PMHCEg0m3xbC0RbLxyHghLO_60OsTj08DhwgwcRaTSTzhZjBx_ULt1xWlvfX1tmGFHxXBbiws$




> On Jul 3, 2024, at 11:27 AM, Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
> 
> Can this problem due to issues with HAproxy?
> 
> On Tue, 2 Jul 2024, 19:22 Scott Ribe, <scott_ribe@elevated-dev.com> wrote:
> > On Jul 2, 2024, at 7:25 AM, Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
> > 
> > Let's ignore pgbouncer. I am getting the same error for client who are connected directly
> 
> Principle is the same, something is setting the read only state.
> 
> - Either the database is read only, as for a hot standby for instance;
> - Or the user is set to default to read only;
> - Or the client is setting read only and not subsequently setting read write.
> 
> Ignoring pg bouncer just means excluding the possibility that the read only state was set by some client other than
theone reporting the error.
 




----------------------------------------------------------------------
CONFIDENTIALITY NOTICE: If you have received this email in error, please immediately notify the sender by e-mail at the
addressshown. This email transmission may contain confidential information.  This information is intended only for the
useof the individual(s) or entity to whom it is intended even if addressed incorrectly.  Please delete it from your
filesif you are not the intended recipient.  Thank you for your compliance.  Copyright (c) 2024 Evernorth 

pgsql-admin by date:

Previous
From: Rajesh Kumar
Date:
Subject: Re: Client not able to pick up
Next
From: Scott Ribe
Date:
Subject: Re: Client not able to pick up