Kevin Brannen <[email protected]> writes:
> I’m having a little trouble and I hope someone can point me towards a fix. 
> ☺
> We’ve been using Pg 9.3.4 and just upgraded to 9.5.1. I’ve installed it 
> on 1 server and it works. ☺ However, when I copied those binaries over to a 
> 2nd server, I find that they won’t start normally. I can do 
> “/etc/init.d/postgresql-9.5 start” from anywhere and it fails to start. 
> Looking in the script, I believe the important line (expanded via bash -x) is:

> + echo -n 'Starting postgresql-9.5 service: '
> Starting postgresql-9.5 service: + runuser -l postgres -c 
> '/opt/pgsql-9.5/bin/postmaster -p '\''5432'\'' -D '\''/nms-db/9.5/data'\''  &'

> In the pgstartup.log, I see:

> LOG:  skipping missing configuration file 
> "/home/postgres/postgresql.auto.conf"
> 2016-07-12 22:16:41 GMT [6066]: [2-1] user=,db=,app= FATAL:  "/home/postgres" 
> is not a valid data directory
> 2016-07-12 22:16:41 GMT [6066]: [3-1] user=,db=,app= DETAIL:  File 
> "/home/postgres/PG_VERSION" is missing.

The postmaster is evidently deciding that /home/postgres is supposed to be
the data directory.  The only theory I can think of to explain this is
that /nms-db/9.5/data contains a postgresql.conf file that sets
data_directory in a way that resolves as that.  It is definitely finding
a postgresql.conf somewhere, else you'd not have gotten this far.

> To make the problem more interesting, I can bring the DB engine up if I use 
> pg_ctl … but only if I’m in the data dir.

Possibly you have "data_directory = ." or something like that in the
config file?

                        regards, tom lane


-- 
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to