From: Tom Lane <tgl@sss.pgh.pa.us>
To: tim@directricity.com
Cc: pgsql-sql@hub.org
Subject: Re: Moving Database -> New Disk
Date: Sun, 14 Feb 1999 13:38:41 -0500
Message-ID: <7732.919017521@sss.pgh.pa.us> (raw)
In-Reply-To: <199902140401.XAA88157@hub.org>
"Tim Perdue, Directricity.com" <tim@directricity.com> writes:
> I'm trying to do somethat that shouldn't be so darn difficult - moving a
> database to a new bigger disk.
> The database is db_domain at /usr/local/pgsq/data/base/db_domain
> I want it to reside on /fireball/pgsql/...
> I created a dump of db_domain and was able to do initdb on the new
> location - but when I try to createdb, of course db_domain is already taken.
It sounds like createdb is connecting to your old postmaster.
> If I try to createdb using the -D switch I get an error about it not being
> able to find the directory (it's there).
createdb's -D is a weird critter that does not have at all the same
meaning as -D in the postmaster. You're still connecting to the same
Postgres installation, you are just telling the system to put the
subdirectory for the particular database in a nonstandard place rather
than under installation-data-directory/base/.
Your message is actually not very clear about whether you want to move
the entire Postgres installation (all of /usr/local/pgsql/data/) or
just the one database (/usr/local/pgsql/data/base/db_domain/). Either
is possible.
> If I don't specify the -D switch, any new database is created under
> /usr/local/pgsql/data/base/, even though I restarted postmaster with -D
> pointing to /fireball/pgsql/....
Hmm, sure sounds like the postmaster's -D didn't "take". You might want
to double check that you gave it correctly. Alternatively, rebuild your
Postgres software with the correct data directory specified at configure
time (I know this works, not sure whether -D really works or not...)
Someone else's suggestion of a symlink would also work.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, tim@directricity.com, pgsql-sql@hub.org
Subject: Re: Moving Database -> New Disk
In-Reply-To: <7732.919017521@sss.pgh.pa.us>
References: <199902140401.XAA88157@hub.org> <7732.919017521@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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