"Tim Perdue, Directricity.com" <tim(at)directricity(dot)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
> 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
pgsql-sql by date
|Next:||From: Remigiusz Sokolowski||Date: 1999-02-15 07:57:26|
|Subject: Re: [SQL] index on aggregate function|
|Previous:||From: Kim Markle||Date: 1999-02-14 16:29:50|
|Subject: RE: [SQL] connection timeout?|