Moved database question

Started by Bayless Kirtleyover 17 years ago3 messagesgeneral
Jump to latest
#1Bayless Kirtley
bkirt@cox.net

I had to move my database to a new disk. I dropped the original after a pg_dump and then removed the old directory. I then ran initdb on the new location, created the database and restored from the pg_dump.

My problem now is that I have to supply the full pathnames to start or stop the server. Otherwise it still wants to access the old location which no longer exists. What am I missing to make the new (and only existing) location be the Postgres default?

Thanks,
Bayless

#2brian
brian@zijn-digital.com
In reply to: Bayless Kirtley (#1)
Re: Moved database question

Bayless Kirtley wrote:

I had to move my database to a new disk. I dropped the original after
a pg_dump and then removed the old directory. I then ran initdb on
the new location, created the database and restored from the pg_dump.

My problem now is that I have to supply the full pathnames to start
or stop the server. Otherwise it still wants to access the old
location which no longer exists. What am I missing to make the new
(and only existing) location be the Postgres default?

You didn't tell us what platform you're using. What does your startup
script have for PGDATA?

#3Scott Marlowe
scott.marlowe@gmail.com
In reply to: Bayless Kirtley (#1)
Re: Moved database question

On Tue, Aug 5, 2008 at 12:45 PM, Bayless Kirtley <bkirt@cox.net> wrote:

I had to move my database to a new disk. I dropped the original after a
pg_dump and then removed the old directory. I then ran initdb on the new
location, created the database and restored from the pg_dump.

My problem now is that I have to supply the full pathnames to start or stop
the server. Otherwise it still wants to access the old location which no
longer exists. What am I missing to make the new (and only existing)
location be the Postgres default?

That very much depends on which OS / version you're on and how you
installed postgresql...