Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/ref/pg_isready.sgml`
cc7197d63b4193970a6b68b7471df80893740951f2cdd4cc00000001000008d5
 Unix-domain
       socket file extension on which the server is listening for
       connections. Defaults to the value of the <envar>PGPORT</envar>
       environment variable or, if not set, to the port specified at
       compile time, usually 5432.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-q</option></term>
      <term><option>--quiet</option></term>
      <listitem>
       <para>
        Do not display status message. This is useful when scripting.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-t <replaceable class="parameter">seconds</replaceable></option></term>
       <term><option>--timeout=<replaceable class="parameter">seconds</replaceable></option></term>
       <listitem>
       <para>
        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.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-U <replaceable class="parameter">username</replaceable></option></term>
       <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
       <listitem>
       <para>
       Connect to the database as the user <replaceable
       class="parameter">username</replaceable> instead of the default.
       </para>
       </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-V</option></term>
      <term><option>--version</option></term>
       <listitem>
        <para>
         Print the <application>pg_isready</application> version and exit.
        </para>
       </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-?</option></term>
      <term><option>--help</option></term>
      <listitem>
       <para>
        Show help about <application>pg_isready</application> command line
        arguments, and exit.
       </para>
      </listitem>
     </varlistentry>
   </variablelist>
 </refsect1>

 <refsect1>
  <title>Exit Status</title>

  <para>
   <application>pg_isready</application> returns <literal>0</literal> to the shell if the server
   is accepting connections

Title: pg_isready Options: Timeout, User, Version, and Help
Summary
This section details additional options for the `pg_isready` command, including setting a connection timeout, specifying a username for the connection, displaying the version, and accessing help information. It describes how to use these options to customize the connection check.