public inbox for [email protected]
help / color / mirror / Atom feedFrom: YoungUk Song <[email protected]>
To: [email protected]
Subject: Best Practices for Checking PostgreSQL Server Mode with Multiple Connections
Date: Sun, 8 Dec 2024 21:45:34 +0900
Message-ID: <CAK9ZnjNECXcXshq6OVzx8ryf0i7KNrp9TErhNkL0ga0c=K-GFA@mail.gmail.com> (raw)
Hi Team,
I’m currently implementing a solution to establish more than 500 database
connections to a single server to verify whether the PostgreSQL server is
in read-only or read-write mode.
My current approach is to create individual database connections and
execute the pg_is_in_recovery() function for each connection to determine
the mode.
I’m curious if there are any best practices or more efficient methods to
achieve this.
Additionally, I’m not very familiar with Psycopg, so I would greatly
appreciate any advice or suggestions on areas that might need improvement.
Looking forward to your insights!
view thread (5+ messages) latest in thread
reply
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: [email protected]
Cc: [email protected]
Subject: Re: Best Practices for Checking PostgreSQL Server Mode with Multiple Connections
In-Reply-To: <CAK9ZnjNECXcXshq6OVzx8ryf0i7KNrp9TErhNkL0ga0c=K-GFA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox