Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghNVl-0008RI-1R for pgsql-general@arkaria.postgresql.org; Wed, 09 Jan 2019 23:43:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ghNVj-0000eZ-Ow for pgsql-general@arkaria.postgresql.org; Wed, 09 Jan 2019 23:43:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghNVj-0000eS-DF for pgsql-general@lists.postgresql.org; Wed, 09 Jan 2019 23:43:47 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghNVg-0005rc-MA for pgsql-general@lists.postgresql.org; Wed, 09 Jan 2019 23:43:46 +0000 Received: by mail-qt1-x841.google.com with SMTP id r14so10445297qtp.1 for ; Wed, 09 Jan 2019 15:43:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DDiU4PxGoW+68ym7vBzfV3K+8WZ1Rhbd1Ngp9NF6LvY=; b=QIPAoBiNeFNVrhLVdtWL9fNvRBFiBx/JkQxJVLH2lpRSIaP5i4JIoQF65oXijbcqWd YR+oAsity0P1rGJGc/VzEk+f2VX4YCIJgqz38a9/st8Sr19TYyeHnbEoK8Z4bpN/y6Su QIKyNBRiug6XVhEr4jhzfAsCOAF9erNeZV2mzZ0R7drdmBdPFfe0XXKknoT7bi9LIAmB +n+ItxzwyRMDbZ3DNUvVeCWABYAq+mC7ntdJNMe2hBr39ZXT18YQQkiBjOLOBdgD/1/T pvv30vtnaP9cmidx/XUtLJ9QNb4G55E7cXiFPxVLPMUTXA0Pff1hVg9vU58l+BtZPnsx 2E1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=DDiU4PxGoW+68ym7vBzfV3K+8WZ1Rhbd1Ngp9NF6LvY=; b=Yg9spSdIFb96oivE1ao9hjp1X8JtVHIgXh+oTykP/9fDAYpEybG7wtBgQvsFL1B7vB 8zJO4xMjUZFcqxK9hj9PY4EsQM04e2XuaNc39rHr44mrLV7Yh0MEyqWykVQBYMRl9Gtu PZp1Xh3xnSVb4J6/IxrvzIkwwQmHKyei/qhNjC8aK7WPSelg4apaSSjDYbuhgEh6blYr GOd6y0EkssVns2WhitvAZx68NhncaN0k4ekijEcwfuJUIQcpyQ6fUuoe0dFJiibUdWDW bw1nhuhKls1Z4y6fPZJojbBSZkJRcV+91Pw56ovo2S32rxoeGpsd0aj+fTOyQ2uMK+YY MStg== X-Gm-Message-State: AJcUukdKOtAGB5+Wy9ozAAUdLWkysIA5exlgnYQk1kgRbEiK779zZ1yN EgckXS1qE5rKNd09hj9ilfbU1ZbyRUiU7H/9dj8KiFkZtHmW8jt1RMLa2j6axRd8un5oJ51s+1F IpbuPoxFc3sweDjE7AaU1fypNpcowgch7oEBksBSGZPiUXdoc9wUUqhE1zurskEP7TRw4T3PqpU q0NisOhw7WHJQ= X-Google-Smtp-Source: ALg8bN5EUZoVQXcWZkeB7rNhD0IwAmZ2v5ibKUTA0geQ1CPaAFe6JPqykv+f01IgHYkJF/TSweLp4g== X-Received: by 2002:ac8:296a:: with SMTP id z39mr7810249qtz.264.1547077423600; Wed, 09 Jan 2019 15:43:43 -0800 (PST) Received: from alderaan.marques ([186.12.108.249]) by smtp.googlemail.com with ESMTPSA id o34sm33406773qte.4.2019.01.09.15.43.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jan 2019 15:43:43 -0800 (PST) Subject: Re: postgres operational To: Ron , pgsql-general@lists.postgresql.org References: <87181bcc-029b-0c0f-6936-d612f01c2223@netwolves.com> <1945c175-0c31-b030-5d52-6535c7f9a5d6@gmail.com> From: =?UTF-8?Q?Mart=c3=adn_Marqu=c3=a9s?= Openpgp: preference=signencrypt Autocrypt: addr=martin@2ndquadrant.com; prefer-encrypt=mutual; keydata= mQENBFGQ9akBCAC+rCultjweJUjKgFfj0s3XQULnyNrC3N8C7Y2v5xPEw+EZAD6+kVDimItf jY2oZGdP8+dmfr79zVSx7IBN+BPXiz+8k+DnGrHchIrGoVcXbOomqqKBYDQYA1DvGU4Nfu3+ g7Iu3FFRdOuJkhW6mP+uXLs3VudM36Ksu9nnWSAtZ7+1k4klstwQEIJk+8xDIi2azJnLstY7 mPOEG2jOIhC0w2Wl6BWIQi0pJr/EjfZRgta4ZrbHnROJZubRcdaZxZmT1bWjrAdPRo3taJzm A82hIh4gTkaFRmiyDvMu8Iu1k1dw1bA4ranrs1MwBbnXZFjLpjXrtc82+btU7yQN4Kb9ABEB AAG0OU1hcnTDrW4gTWFycXXDqXMgKERCQSBBcmdlbnRpbmEpIDxtYXJ0aW5AMm5kcXVhZHJh bnQuY29tPokBPgQTAQIAKAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AFAlsCpfUFCQ00 FzQACgkQewO0SAEAVNKFygf+O2tIEXklaoSUhx2XM62NX7Ao8VaTaVBFZv1PFyKjqK96NZL6 oGjqO9z7LXjIWUatXVBH3Cxa4j/RNovWh0eNykIHZQN/gAYNB9eE8TmRRtj+S3D/rukwnu2s 16ALzEu5x2OABFEgj+/hH3JFViSC1mBnibFLYtTm4ydzL/URpObffgCeHXxBrHZ0o7XZsTBk 8UwNcsFpblSEdEpCZj/14UwAlEs5DPEMqn0I0hNHcVbliPKhy7CETJSet0hbpJvFqaJTbb0d p6i/Z8bHP0IrmYJWpkX5vH9oexYyPRM+nc1FXJnich3MtHfA/fTtGrM9XLWCt+NX5pdkHIUE ApfLXLkBDQRRkPWpAQgAoNxnsp7AIiOBT8ufUbTGFWNbOsViwFT7kMnQixNaR69S/YBxkWit BdogJA9D0y0j/qBEzY+XwZGVPLi4eYYRl0+u6qobpmgy2fIGaIyW8H20Zi8RYcjbixfLNrZV W0Wj4RDgiv1wnJqlTTu6sNtv1pHXfxnTxB27DHbQnNiBt/NC4gvy3TRIEzAECOg+unFtOxhS jx6uNRllU/uo7iPYUyJT5HyTNxYQQRK3h6wGhtMlxPi+0mY7TvsS0Pmvi5wWPQRRRs+waYbX A7lYXO1a1SCeR4KgTm3AXcj0iTPL7xxsMZQuPIaJMf/p9x4Ay4M9V6Mn02AvA6TQezL7NVsO gwARAQABiQElBBgBAgAPAhsMBQJbAqZ8BQkNNBfPAAoJEHsDtEgBAFTSItoH/2l15R9tmcRv zuNpsoYxpI2u+hvItRiXTN0Q5cOiiR7t03I1LjqSu66DhpvNCpWcQ05KUyrUH6S/GrDHHkbX 461XwdTjJDjQB8DiKmLRduf/CLD9uhpKDocGiazN0rJrLwDIok73YjCBiOV5CRmEyCoK1mNW suMNC6sMjNdBUi2ZOFAcrvG+RotsjDDGc0fRAV9UhykJuZuiE+no6f/WDu/iV2bAU832+/m1 5Nh06IDKazVMw/Twfkxm1NTTL6W/wcQIk0LjAFSDzgYud0i0lbe67R+Al94n+Zfp5slgsB4u xGH9NyG1PkFOSA8WyXSEWXbLPgXmZh/E6FqefUbHnjA= Message-ID: <31cd6071-8ea5-a29d-ec77-c158a087d2b5@2ndquadrant.com> Date: Wed, 9 Jan 2019 20:43:41 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <1945c175-0c31-b030-5d52-6535c7f9a5d6@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: es-AR Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk El 9/1/19 a las 17:38, Ron escribió: > On 1/9/19 12:19 PM, Martín Marqués wrote: >> El 9/1/19 a las 14:58, Steve Clark escribió: >>> Hi List, >>> >>> Is there a sure fire way to tell if postgres server is up an >>> operational. I was testing to see if the >>> socket at /tmp/.s.PGSQL.5432 existed - but I ran into a recent >>> problem on CentOS 7.5, postgresql 9.2.24, where the >>> socket was there but my script couldn't read from my database yet. >> Use `check_postgres` > > Isn't "pg_ctl status" the canonical method? Depends on what you are expecting. `check_postgres` has many different checks, one which will actually try to connect and run `SELECT 1` to make sure postgres can actually run a query. pg_ctl status might return ok, yet you can't connect for other reasons. -- Martín Marqués http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services