Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9jiX-0000B7-5n for pgsql-admin@arkaria.postgresql.org; Tue, 09 Oct 2018 04:33:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g9jiU-0003QF-U0 for pgsql-admin@arkaria.postgresql.org; Tue, 09 Oct 2018 04:33:54 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9jiU-0003Q8-J8 for pgsql-admin@lists.postgresql.org; Tue, 09 Oct 2018 04:33:54 +0000 Received: from cat-porwal-prod-mail1.catalyst.net.nz ([202.78.240.226]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g9jiP-00026X-Rs for pgsql-admin@lists.postgresql.org; Tue, 09 Oct 2018 04:33:52 +0000 Received: from [IPv6:2406:e001:b7c:1:45a3:1af4:8489:8135] (unknown [IPv6:2406:e001:b7c:1:45a3:1af4:8489:8135]) (Authenticated sender: mark.kirkwood@catalyst.net.nz) by cat-porwal-prod-mail1.catalyst.net.nz (Postfix) with ESMTPSA id 24BF480B88 for ; Tue, 9 Oct 2018 17:33:43 +1300 (NZDT) Subject: Re: Error when starting postgres database!! To: pgsql-admin@lists.postgresql.org References: <1539058967018-0.post@n3.nabble.com> From: Mark Kirkwood Message-ID: <3787fa24-6a81-e227-9922-86558280590d@catalyst.net.nz> Date: Tue, 9 Oct 2018 17:33:41 +1300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1539058967018-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Authentication-Results: ORIGINATING; auth=pass smtp.auth=mark.kirkwood@catalyst.net.nz smtp.mailfrom=mark.kirkwood@catalyst.net.nz List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 09/10/18 17:22, pavan95 wrote: > Hi, > > I'm facing an error in starting my postgresql database. The error is as > shown below: > > bash-4.1$ psql > psql: could not connect to server: No such file or directory > Is the server running locally and accepting > connections on Unix domain socket > "/var/run/postgresql/.s.PGSQL.5432"? The default client config expects the server's socket in /var/run/postgresql. Yours is not there. Try this: $ psql -h localhost > > But surprisingly the port was open at 5432, I got it confirmed as below: > > top -u postgres > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > 6180 postgres 20 0 164m 2296 1824 S 0.9 0.0 0:00.36 > /usr/pgsql-9.1/bin/pg_statsinfod 6171 > 6861 postgres 20 0 17176 1324 952 R 0.9 0.0 0:00.01 top -u postgres > 6171 postgres 20 0 234m 20m 19m S 0.0 0.3 0:00.47 > /usr/pgsql-9.1/bin/postmaster -p 5432 -D /home/new_data/9.1/data > 6173 postgres 20 0 179m 1444 636 S 0.0 0.0 0:00.24 postgres: > pg_statsinfo launcher process > 6174 postgres 20 0 181m 1368 520 S 0.0 0.0 0:00.03 postgres: > logger process > 6176 postgres 20 0 234m 1792 920 S 0.0 0.0 0:00.17 postgres: > writer process > 6177 postgres 20 0 234m 1520 648 S 0.0 0.0 0:00.14 postgres: wal > writer process > 6178 postgres 20 0 235m 3300 1344 S 0.0 0.0 0:00.14 postgres: > autovacuum launcher process > 6179 postgres 20 0 184m 1936 604 S 0.0 0.0 0:00.26 postgres: stats > collector process > 6826 postgres 20 0 107m 1740 1304 S 0.0 0.0 0:00.00 bash > > Is there any issue with my configuration?? Kindly suggest! > > > Looks like a non standard setup (data directory /home/new_data/9.1/data). What is unix_socket_directories set to in your postgresql.conf? (If not set then it is probably using /tmp) regards Mark