From: | David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | postmaster.opts, moving datadir around, and pg_ctl |
Date: | 2004-07-25 12:45:19 |
Message-ID: | 4103AB5E.5070905@zara.6.isreserved.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I had datadir in /dir1 and I started postmaster with:
postmaster -D /dir1
this recorded "-D /dir1" in /dir1/postmaster.opts. Then I stopped
postmaster and moved /dir1 to /dir2. I then started postmaster with:
PG_DATA=/dir2 pg_ctl start
It worked normally. But:
PG_DATA=/dir2 pg_ctl restart
failed when starting postmaster because it used datadir from
postmaster.opts (/dir1). This worked though:
pg_ctl restart -D /dir2
So there's a slight inconsistency between the start and restart command.
Would it be nicer if postmaster doesn't record -D in postmaster.opts, or
if pg_ctl strips it? Or is it entirely my fault for not adjusting
postmaster.opts when I move datadir around? IMO it would be nice if
datadir is portable (i.e. it doesn't contain its own full path).
Also pardon my ignorance, but what is the purpose of having
postmaster.opts inside datadir?
This is postgresql 7.4.3 on Linux.
--
dave
From | Date | Subject | |
---|---|---|---|
Next Message | David Garamond | 2004-07-25 12:45:22 | pg_ctl and failing postmaster |
Previous Message | Andrew Dunstan | 2004-07-25 12:32:48 | Re: [HACKERS] 7.5 release notes |