Re: Trouble starting Postgresql after an upgrade

From: Kevin Brannen <KBrannen(at)efji(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trouble starting Postgresql after an upgrade
Date: 2016-07-14 17:43:11
Message-ID: CE782658D4A193498ABF0FD938CD77BEE8B685@EFJDFWMB01.EFJDFW.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----Original Message-----
From: Adrian Klaver [mailto:adrian(dot)klaver(at)aklaver(dot)com]

> What OS, OS version and architecture for each machine?
>
> How did you upgrade?

CentOS 5.9 on both servers. (Yes, we know it's old, we're moving to 6.7, but we still have some older servers to support and we want to run the same Pg on the new and the old. :)
I used pg_upgrade, but the details don't matter now...

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]

> 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.

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

Wow, you nailed it! For some reason, I read over:

data_directory = '' # that's 2 single quotes and therefore the empty string

multiple times and missed it every time. I set that to the proper dir and life is good again. Obviously, that's something that must be changed in the automated upgrade script.

While it might be nice if the server warned of an "empty" dir for that config value, the problem was totally mine.

Thanks so very much to each of you!
Kevin
This e-mail transmission, and any documents, files or previous e-mail messages attached to it, may contain confidential information. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, distribution, review, copy or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify us by reply e-mail, and destroy the original transmission and its attachments without reading them or saving them to disk. Thank you.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2016-07-14 18:03:49 Re: Tracking IO Queries
Previous Message Tom Lane 2016-07-14 17:01:39 Re: Trouble starting Postgresql after an upgrade