public inbox for [email protected]help / color / mirror / Atom feed
pgping? 15+ messages / 5 participants [nested] [flat]
* pgping? @ 2025-09-18 20:46 Ron Watkins <[email protected]> 0 siblings, 1 reply; 15+ messages in thread From: Ron Watkins @ 2025-09-18 20:46 UTC (permalink / raw) To: pgsql-admin How do you install pgping on RHEL 9? It doesn't appear to come with the distribution. Is there some specific repo you need to use? -- Ron Watkins, K7DOG 602.743.5272 ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-09-19 04:00 Ron Johnson <[email protected]> parent: Ron Watkins <[email protected]> 0 siblings, 1 reply; 15+ messages in thread From: Ron Johnson @ 2025-09-19 04:00 UTC (permalink / raw) To: pgsql-admin On Thu, Sep 18, 2025 at 4:47 PM Ron Watkins <[email protected]> wrote: > How do you install pgping on RHEL 9? > It doesn't appear to come with the distribution. > Is there some specific repo you need to use? > Is it in the RHEL 8 repo? What does it do that ncat and psql don't do? Test_PG1() { nc -zw5 $1 5432 &> /dev/null ; } Test_PG2() { psql -h $1 -XAtqc "select version()" &> /dev/null ; } Test_PG1 example.com || { echo "Server inaccessible."; do_something; } -- Death to <Redacted>, and butter sauce. Don't boil me, I'm still alive. <Redacted> lobster! ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-09-19 04:06 Tom Lane <[email protected]> parent: Ron Johnson <[email protected]> 0 siblings, 2 replies; 15+ messages in thread From: Tom Lane @ 2025-09-19 04:06 UTC (permalink / raw) To: Ron Johnson <[email protected]>; +Cc: pgsql-admin Ron Johnson <[email protected]> writes: > On Thu, Sep 18, 2025 at 4:47 PM Ron Watkins <[email protected]> wrote: >> How do you install pgping on RHEL 9? >> It doesn't appear to come with the distribution. >> Is there some specific repo you need to use? > What does it do that ncat and psql don't do? pg_isready might be what the OP wants. regards, tom lane ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-09-19 04:09 Ron Johnson <[email protected]> parent: Tom Lane <[email protected]> 1 sibling, 1 reply; 15+ messages in thread From: Ron Johnson @ 2025-09-19 04:09 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: pgsql-admin On Fri, Sep 19, 2025 at 12:06 AM Tom Lane <[email protected]> wrote: > Ron Johnson <[email protected]> writes: > > On Thu, Sep 18, 2025 at 4:47 PM Ron Watkins <[email protected]> wrote: > >> How do you install pgping on RHEL 9? > >> It doesn't appear to come with the distribution. > >> Is there some specific repo you need to use? > > > What does it do that ncat and psql don't do? > > pg_isready might be what the OP wants. > Is that a wrapper around PQping? -- Death to <Redacted>, and butter sauce. Don't boil me, I'm still alive. <Redacted> lobster! ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-09-19 04:17 David G. Johnston <[email protected]> parent: Ron Johnson <[email protected]> 0 siblings, 0 replies; 15+ messages in thread From: David G. Johnston @ 2025-09-19 04:17 UTC (permalink / raw) To: Ron Johnson <[email protected]>; +Cc: Tom Lane <[email protected]>; pgsql-admin On Thursday, September 18, 2025, Ron Johnson <[email protected]> wrote: > > > Is that a wrapper around PQping? > Yes. https://github.com/postgres/postgres/blob/master/src/bin/scripts/pg_isready.c David J. ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-12 16:41 Gunnar <[email protected]> parent: Tom Lane <[email protected]> 1 sibling, 3 replies; 15+ messages in thread From: Gunnar @ 2025-12-12 16:41 UTC (permalink / raw) To: [email protected] On 9/19/25 06:06, Tom Lane wrote: > Ron Johnson <[email protected]> writes: >> On Thu, Sep 18, 2025 at 4:47 PM Ron Watkins <[email protected]> wrote: >>> How do you install pgping on RHEL 9? >>> It doesn't appear to come with the distribution. >>> Is there some specific repo you need to use? >> What does it do that ncat and psql don't do? > pg_isready might be what the OP wants. > > regards, tom lane my latest experience with pg_isready reminded me that it only works on a general level (cluster ready generally) though. If you include a database to the command it still reports true even if the database you want to address does not exist. That said I remember that I read this was broken since ... forever, which means nobody cares. ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-13 14:54 David G. Johnston <[email protected]> parent: Gunnar <[email protected]> 2 siblings, 1 reply; 15+ messages in thread From: David G. Johnston @ 2025-12-13 14:54 UTC (permalink / raw) To: Gunnar <[email protected]>; +Cc: [email protected] <[email protected]> On Friday, December 12, 2025, Gunnar <[email protected]> wrote: > > my latest experience with pg_isready reminded me that it only works on a > general level (cluster ready generally) though. > If you include a database to the command it still reports true even if the > database you want to address does not exist. > > That said I remember that I read this was broken since ... forever, which > means nobody cares. > > It isn’t broken - it is working precisely as intended and required for the use cases it’s meant to solve. That’s why no one is fixing it. These people that want it to solve additional use cases need to step up and implement some new features for it. David J. ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-13 15:59 Tom Lane <[email protected]> parent: Gunnar <[email protected]> 2 siblings, 0 replies; 15+ messages in thread From: Tom Lane @ 2025-12-13 15:59 UTC (permalink / raw) To: Gunnar <[email protected]>; +Cc: [email protected] Gunnar <[email protected]> writes: > On 9/19/25 06:06, Tom Lane wrote: >> pg_isready might be what the OP wants. > my latest experience with pg_isready reminded me that it only works on a > general level (cluster ready generally) though. > If you include a database to the command it still reports true even if > the database you want to address does not exist. If you want to see whether you can log in, then try to log in, using psql or pretty much any other client. That is not the problem that pg_isready seeks to solve. regards, tom lane ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-13 17:12 Ron Johnson <[email protected]> parent: Gunnar <[email protected]> 2 siblings, 1 reply; 15+ messages in thread From: Ron Johnson @ 2025-12-13 17:12 UTC (permalink / raw) To: Pgsql-admin <[email protected]> On Sat, Dec 13, 2025 at 8:20 AM Gunnar <[email protected]> wrote: > > > On 9/19/25 06:06, Tom Lane wrote: > > Ron Johnson <[email protected]> writes: > >> On Thu, Sep 18, 2025 at 4:47 PM Ron Watkins <[email protected]> wrote: > >>> How do you install pgping on RHEL 9? > >>> It doesn't appear to come with the distribution. > >>> Is there some specific repo you need to use? > >> What does it do that ncat and psql don't do? > > pg_isready might be what the OP wants. > > > > regards, tom lane > my latest experience with pg_isready reminded me that it only works on a > general level (cluster ready generally) though. > If you include a database to the command it still reports true even if > the database you want to address does not exist. > > That said I remember that I read this was broken since ... forever, > which means nobody cares. > pg_isready is "ncat -zv $host 5432" for systems which don't have ncat installed. No/few Linux systems meet that criterion, but Windows systems might. -- Death to <Redacted>, and butter sauce. Don't boil me, I'm still alive. <Redacted> lobster! ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-13 18:19 David G. Johnston <[email protected]> parent: Ron Johnson <[email protected]> 0 siblings, 1 reply; 15+ messages in thread From: David G. Johnston @ 2025-12-13 18:19 UTC (permalink / raw) To: Ron Johnson <[email protected]>; +Cc: Pgsql-admin <[email protected]> On Saturday, December 13, 2025, Ron Johnson <[email protected]> wrote: > > pg_isready is "ncat -zv $host 5432" for systems which don't have ncat > installed. > Pretty sure this is also an incorrect, or at least incomplete statement. pg_isready uses the PostgreSQL wire protocol to make a better determination as to readiness than ncat does. People are just complaining that it doesn’t go further than it does. They see “user” and “database” and misinterpret why those options exist. David J. ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-13 18:22 Gunnar <[email protected]> parent: David G. Johnston <[email protected]> 0 siblings, 2 replies; 15+ messages in thread From: Gunnar @ 2025-12-13 18:22 UTC (permalink / raw) To: [email protected] On 12/13/25 15:54, David G. Johnston wrote: > > > On Friday, December 12, 2025, Gunnar <[email protected]> wrote: > > > my latest experience with pg_isready reminded me that it only > works on a general level (cluster ready generally) though. > If you include a database to the command it still reports true > even if the database you want to address does not exist. > > That said I remember that I read this was broken since ... > forever, which means nobody cares. > > > It isn’t broken - it is working precisely as intended and required for > the use cases it’s meant to solve. That’s why no one is fixing it. > These people that want it to solve additional use cases need to step > up and implement some new features for it. hm, one might argue, that if the use case 'pg_isready -d database' is mentioned in the manual this could be seen as the aspiration, or maybe even commitment to that feature. Even the description of pg_isready --help mentions a "connection check to a database", not a cluster. Do I misinterpret the manual/help? If that was the case my next question was ... what is the purpose of the option -d, --dbname=DBNAME ? all best ... Gunnar ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-13 22:27 Ron Johnson <[email protected]> parent: David G. Johnston <[email protected]> 0 siblings, 1 reply; 15+ messages in thread From: Ron Johnson @ 2025-12-13 22:27 UTC (permalink / raw) To: Pgsql-admin <[email protected]> On Sat, Dec 13, 2025 at 1:19 PM David G. Johnston < [email protected]> wrote: > On Saturday, December 13, 2025, Ron Johnson <[email protected]> > wrote: >> >> pg_isready is "ncat -zv $host 5432" for systems which don't have ncat >> installed. >> > > Pretty sure this is also an incorrect, or at least incomplete statement. > pg_isready uses the PostgreSQL wire protocol to make a better > determination as to readiness than ncat does. People are just complaining > that it doesn’t go further than it does. They see “user” and “database” > and misinterpret why those options exist. > We've had this discussion before: people see the --dbname and --username options, then quite reasonably think "ah, those options must mean you can test whether a specific database and/or role can connect; otherwise, why the heck would you put them in the --help output?" Bottom line: the purpose of --dbname is to specify a database name; the purpose of --username is to specify a username. Having them in the --help output *misleads the user*. -- Death to <Redacted>, and butter sauce. Don't boil me, I'm still alive. <Redacted> lobster! ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-14 05:59 David G. Johnston <[email protected]> parent: Ron Johnson <[email protected]> 0 siblings, 0 replies; 15+ messages in thread From: David G. Johnston @ 2025-12-14 05:59 UTC (permalink / raw) To: Ron Johnson <[email protected]>; +Cc: Pgsql-admin <[email protected]> On Sat, Dec 13, 2025 at 3:27 PM Ron Johnson <[email protected]> wrote: > On Sat, Dec 13, 2025 at 1:19 PM David G. Johnston < > [email protected]> wrote: > >> On Saturday, December 13, 2025, Ron Johnson <[email protected]> >> wrote: >>> >>> pg_isready is "ncat -zv $host 5432" for systems which don't have ncat >>> installed. >>> >> >> Pretty sure this is also an incorrect, or at least incomplete statement. >> pg_isready uses the PostgreSQL wire protocol to make a better >> determination as to readiness than ncat does. People are just complaining >> that it doesn’t go further than it does. They see “user” and “database” >> and misinterpret why those options exist. >> > > We've had this discussion before: people see the --dbname and --username > options, then quite reasonably think "ah, those options must mean you can > test whether a specific database and/or role can connect; otherwise, why > the heck would you put them in the --help output?" > > Bottom line: the purpose of --dbname is to specify a database name; the > purpose of --username is to specify a username. Having them in the --help > output *misleads the user*. > > Yes, here. https://www.postgresql.org/message-id/flat/CANzqJaCSbqU3QUqMhfv5ivYww%3DJQNwyYnKWnEJoO_onCiCrhSg%40m... It's unfortunate that the default assumption about those options is incorrect and one needs to read the notes to understand their purpose. David J. ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-14 12:54 David G. Johnston <[email protected]> parent: Gunnar <[email protected]> 1 sibling, 0 replies; 15+ messages in thread From: David G. Johnston @ 2025-12-14 12:54 UTC (permalink / raw) To: Gunnar <[email protected]>; +Cc: [email protected] <[email protected]> On Saturday, December 13, 2025, Gunnar <[email protected]> wrote: > > > On 12/13/25 15:54, David G. Johnston wrote: > > > > On Friday, December 12, 2025, Gunnar <[email protected]> wrote: > >> >> my latest experience with pg_isready reminded me that it only works on a >> general level (cluster ready generally) though. >> If you include a database to the command it still reports true even if >> the database you want to address does not exist. >> >> That said I remember that I read this was broken since ... forever, which >> means nobody cares. >> >> > It isn’t broken - it is working precisely as intended and required for the > use cases it’s meant to solve. That’s why no one is fixing it. These > people that want it to solve additional use cases need to step up and > implement some new features for it. > > > hm, one might argue, that if the use case 'pg_isready -d database' is > mentioned in the manual this could be seen as the aspiration, or maybe even > commitment to that feature. > Even the description of pg_isready --help mentions a "connection check to > a database", not a cluster. > > Do I misinterpret the manual/help? If that was the case my next question > was ... what is the purpose of the option -d, --dbname=DBNAME ? > As I wrote in the other thread while rephrasing what the docs say: it avoids an inconsequential error message in the server log since the backend protocol requires any connection attempt to include those fields and sometime the defaults aren’t correct. David J, ^ permalink raw reply [nested|flat] 15+ messages in thread
* Re: pgping? @ 2025-12-14 13:00 David G. Johnston <[email protected]> parent: Gunnar <[email protected]> 1 sibling, 0 replies; 15+ messages in thread From: David G. Johnston @ 2025-12-14 13:00 UTC (permalink / raw) To: Gunnar <[email protected]>; +Cc: [email protected] <[email protected]> On Saturday, December 13, 2025, Gunnar <[email protected]> wrote: > > as the aspiration, or maybe even commitment to that feature. > > The amount of additional effort here, to meet such a theoretical commitment, is so small that this interpretation seems extremely unlikely. It was a deliberate choice that “is cluster running” not require any particular element in that cluster to exist. David J. ^ permalink raw reply [nested|flat] 15+ messages in thread
end of thread, other threads:[~2025-12-14 13:00 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-09-18 20:46 pgping? Ron Watkins <[email protected]> 2025-09-19 04:00 ` Ron Johnson <[email protected]> 2025-09-19 04:06 ` Tom Lane <[email protected]> 2025-09-19 04:09 ` Ron Johnson <[email protected]> 2025-09-19 04:17 ` David G. Johnston <[email protected]> 2025-12-12 16:41 ` Gunnar <[email protected]> 2025-12-13 14:54 ` David G. Johnston <[email protected]> 2025-12-13 18:22 ` Gunnar <[email protected]> 2025-12-14 12:54 ` David G. Johnston <[email protected]> 2025-12-14 13:00 ` David G. Johnston <[email protected]> 2025-12-13 15:59 ` Tom Lane <[email protected]> 2025-12-13 17:12 ` Ron Johnson <[email protected]> 2025-12-13 18:19 ` David G. Johnston <[email protected]> 2025-12-13 22:27 ` Ron Johnson <[email protected]> 2025-12-14 05:59 ` David G. Johnston <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox