From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Rajesh Kumar <rajeshkumar.dba09@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Client not able to pick up
Date: Wed, 3 Jul 2024 12:42:55 -0600
Message-ID: <0FC6C4CA-FCCD-4C20-B177-477627D5123B@elevated-dev.com> (raw)
In-Reply-To: <CAJk5Atatgc=PwTcfD-JRumy9b_spWP7+yaVJ6j291SGaPQiR_Q@mail.gmail.com>
References: <CAJk5AtY89NpL=syZTS9vSwndLF9Si2swLyZ0n6EdP08Opy76_Q@mail.gmail.com>
<177F52B5-FCD8-4EAC-9277-52674A5952F9@elevated-dev.com>
<CAJk5AtbJMX3ZzH-FH6G97PpRe9Eq5fimaMxTXR4B=mxWZiuttQ@mail.gmail.com>
<2B3F3D22-6435-4D1E-B45A-4C6FB7CDC00C@elevated-dev.com>
<CAJk5Atatgc=PwTcfD-JRumy9b_spWP7+yaVJ6j291SGaPQiR_Q@mail.gmail.com>
How are you using HAProxy??? PostgreSQL can only have one master taking writes. So if you're sending write transactions to HAProxy to split among master & replicas, then yeah, there's your problem.
--
Scott Ribe
scott_ribe@elevated-dev.com
https://www.linkedin.com/in/scottribe/> 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 the one reporting the error.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: scott_ribe@elevated-dev.com, rajeshkumar.dba09@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Client not able to pick up
In-Reply-To: <0FC6C4CA-FCCD-4C20-B177-477627D5123B@elevated-dev.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox