pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Error when starting postgres database!!
5+ messages / 3 participants
[nested] [flat]
* Re: Error when starting postgres database!!
@ 2018-10-09 04:22 pavan95 <pavan.postgresdba@gmail.com>
2018-10-09 04:33 ` Re: Error when starting postgres database!! Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
2018-10-09 04:38 ` Re: Error when starting postgres database!! Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 5+ messages in thread
From: pavan95 @ 2018-10-09 04:22 UTC (permalink / raw)
To: pgsql-admin
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"?
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!
Regards,
Pavan
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error when starting postgres database!!
2018-10-09 04:22 Re: Error when starting postgres database!! pavan95 <pavan.postgresdba@gmail.com>
@ 2018-10-09 04:33 ` Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
2018-10-09 04:46 ` Re: Error when starting postgres database!! pavan95 <pavan.postgresdba@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Mark Kirkwood @ 2018-10-09 04:33 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error when starting postgres database!!
2018-10-09 04:22 Re: Error when starting postgres database!! pavan95 <pavan.postgresdba@gmail.com>
2018-10-09 04:33 ` Re: Error when starting postgres database!! Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
@ 2018-10-09 04:46 ` pavan95 <pavan.postgresdba@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: pavan95 @ 2018-10-09 04:46 UTC (permalink / raw)
To: pgsql-admin
Thank You mark. I was able to connect now!!!
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error when starting postgres database!!
2018-10-09 04:22 Re: Error when starting postgres database!! pavan95 <pavan.postgresdba@gmail.com>
@ 2018-10-09 04:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-12-07 13:47 ` Re: Error when starting postgres database!! pavan95 <pavan.postgresdba@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Tom Lane @ 2018-10-09 04:38 UTC (permalink / raw)
To: pavan95 <pavan.postgresdba@gmail.com>; +Cc: pgsql-admin
pavan95 <pavan.postgresdba@gmail.com> writes:
> 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"?
Note the error message: it mentions the Unix socket location
"/var/run/postgresql/.s.PGSQL.5432". This means the psql (or
more precisely, libpq.so) that you're using thinks that PG
socket files live in /var/run/postgresql. That is *not* standard;
as shipped by the community, PG puts its socket files in "/tmp".
However, various distros think that is bad style and override
the build option to put the socket files elsewhere, most often
/var/run/postgresql.
In short, you are probably using a vendor-supplied libpq to
try to talk to a PG server that was built from unmodified
community code. You could confirm the latter by looking to see
if there's a /tmp/.s.PGSQL.5432 socket file.
You could use "psql -h /tmp" to override libpq's idea of the
socket location, or use "psql -h localhost" to forget about
socket files and connect via TCP, or change the server's
unix_socket_directories parameter to make it create a socket
(or additional socket) in /var/run/postgresql, or replace
either your libpq or your server with something that's got
the same built-in default location as the other end.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Error when starting postgres database!!
2018-10-09 04:22 Re: Error when starting postgres database!! pavan95 <pavan.postgresdba@gmail.com>
2018-10-09 04:38 ` Re: Error when starting postgres database!! Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-12-07 13:47 ` pavan95 <pavan.postgresdba@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: pavan95 @ 2018-12-07 13:47 UTC (permalink / raw)
To: pgsql-admin
Thank you soo much, for your valuable explanation.
Regards,
Pavan
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2018-12-07 13:47 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 04:22 Re: Error when starting postgres database!! pavan95 <pavan.postgresdba@gmail.com>
2018-10-09 04:33 ` Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
2018-10-09 04:46 ` pavan95 <pavan.postgresdba@gmail.com>
2018-10-09 04:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-12-07 13:47 ` pavan95 <pavan.postgresdba@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox