EnglishFrenchSpanish

OnWorks favicon

pg_isready - Online in the Cloud

Run pg_isready in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command pg_isready that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


pg_isready - check the connection status of a PostgreSQL server

SYNOPSIS


pg_isready [connection-option...] [option...]

DESCRIPTION


pg_isready is a utility for checking the connection status of a PostgreSQL database
server. The exit status specifies the result of the connection check.

OPTIONS


-d dbname
--dbname=dbname
Specifies the name of the database to connect to.

If this parameter contains an = sign or starts with a valid URI prefix (postgresql://
or postgres://), it is treated as a conninfo string. See Section 31.1.1, “Connection
Strings”, in the documentation for more information.

-h hostname
--host=hostname
Specifies the host name of the machine on which the server is running. If the value
begins with a slash, it is used as the directory for the Unix-domain socket.

-p port
--port=port
Specifies the TCP port or the local Unix-domain socket file extension on which the
server is listening for connections. Defaults to the value of the PGPORT environment
variable or, if not set, to the port specified at compile time, usually 5432.

-q
--quiet
Do not display status message. This is useful when scripting.

-t seconds
--timeout=seconds
The maximum number of seconds to wait when attempting connection before returning that
the server is not responding. Setting to 0 disables. The default is 3 seconds.

-U username
--username=username
Connect to the database as the user username instead of the default.

-V
--version
Print the pg_isready version and exit.

-?
--help
Show help about pg_isready command line arguments, and exit.

EXIT STATUS


pg_isready returns 0 to the shell if the server is accepting connections normally, 1 if
the server is rejecting connections (for example during startup), 2 if there was no
response to the connection attempt, and 3 if no attempt was made (for example due to
invalid parameters).

ENVIRONMENT


pg_isready, like most other PostgreSQL utilities, also uses the environment variables
supported by libpq (see Section 31.14, “Environment Variables”, in the documentation).

NOTES


It is not necessary to supply correct user name, password, or database name values to
obtain the server status; however, if incorrect values are provided, the server will log a
failed connection attempt.

EXAMPLES


Standard Usage:

$ pg_isready
/tmp:5432 - accepting connections
$ echo $?
0

Running with connection parameters to a PostgreSQL cluster in startup:

$ pg_isready -h localhost -p 5433
localhost:5433 - rejecting connections
$ echo $?
1

Running with connection parameters to a non-responsive PostgreSQL cluster:

$ pg_isready -h someremotehost
someremotehost:5432 - no response
$ echo $?
2

Use pg_isready online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    facetracknoir
    facetracknoir
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • 2
    PHP QR Code
    PHP QR Code
    PHP QR Code is open source (LGPL)
    library for generating QR Code,
    2-dimensional barcode. Based on
    libqrencode C library, provides API for
    creating QR Code barc...
    Download PHP QR Code
  • 3
    Freeciv
    Freeciv
    Freeciv is a free turn-based
    multiplayer strategy game, in which each
    player becomes the leader of a
    civilization, fighting to obtain the
    ultimate goal: to bec...
    Download Freeciv
  • 4
    Cuckoo Sandbox
    Cuckoo Sandbox
    Cuckoo Sandbox uses components to
    monitor the behavior of malware in a
    Sandbox environment; isolated from the
    rest of the system. It offers automated
    analysis o...
    Download Cuckoo Sandbox
  • 5
    LMS-YouTube
    LMS-YouTube
    Play YouTube video on LMS (porting of
    Triode's to YouTbe API v3) This is
    an application that can also be fetched
    from
    https://sourceforge.net/projects/lms-y...
    Download LMS-YouTube
  • 6
    Windows Presentation Foundation
    Windows Presentation Foundation
    Windows Presentation Foundation (WPF)
    is a UI framework for building Windows
    desktop applications. WPF supports a
    broad set of application development
    features...
    Download Windows Presentation Foundation
  • More »

Linux commands

Ad