Re: Best Practices for Checking PostgreSQL Server Mode with Multiple Connections - Mailing list psycopg

From Christophe Pettus
Subject Re: Best Practices for Checking PostgreSQL Server Mode with Multiple Connections
Date
Msg-id F9E69013-F05C-4095-A1BC-DA1B8F6B781A@thebuild.com
Whole thread Raw
In response to Re: Best Practices for Checking PostgreSQL Server Mode with Multiple Connections  (YoungUk Song <pidaoh@g.skku.edu>)
List psycopg

> On Dec 9, 2024, at 06:04, YoungUk Song <pidaoh@g.skku.edu> wrote:
> Are there any best practices for efficiently handling this task across such a large number of servers?

Out of curiosity, shouldn't something in your infrastructure know this information already?  After all, something
createdall these servers. 

That being said, you will need to open connections to the servers to determine if they are in recovery or not.  You
mightbe able to do a small optimization in that, when you connect, you also query to see what servers are attached to
thatserver as binary replicas: you can then remove them from the list of servers that need to be checked, since you
knowthey are in recovery.  If you have cascaded binary replicas, however, this could end up creating more work than it
solves.


psycopg by date:

Previous
From: YoungUk Song
Date:
Subject: Re: Best Practices for Checking PostgreSQL Server Mode with Multiple Connections
Next
From: Adrian Klaver
Date:
Subject: Re: Best Practices for Checking PostgreSQL Server Mode with Multiple Connections