RE: Problems with new data location
От | Karen Ellrick |
---|---|
Тема | RE: Problems with new data location |
Дата | |
Msg-id | GAELLCMOCEGMDMHDMIILEEHCCIAA.k-ellrick@sctech.co.jp обсуждение исходный текст |
Ответ на | Re: Problems with new data location (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Problems with new data location
|
Список | pgsql-general |
Tom Lane wrote: > But ... um ... did you restart the postmaster with the new path argument? > Or only change the script? Well, now I can't remember the exact sequence I used originally - I probably tried to restart only after all the changes had taken place. I do remember getting the error "can't find /usr/local/pgsql/data/postmaster.pid - is postmaster running?", and dummy me, I assumed it wasn't, without checking ps. Anyway, restarting doesn't seem to work if I actually move the directory rather than copy it. But after I got your message, I checked ps and discovered that indeed, postmaster was still running. So I put the directory back in its old place, successfully ran "pg_ctl -D /usr/local/pgsql/data stop", then moved the directory, and then successfully ran "pg_ctl -D /var/pgdata stop". > BTW, it should work fine to move a data-directory tree from one place to > another (with cp -p -r or tar/untar according to preference). But you > have to shut down the old postmaster *first*. Yup, the key is that both those methods copy (rather than move) the directory. If you copy, you can use restart (I assume - I didn't try it). If you want to simply move the directory, you have to (1) stop, (2) move, (3) start. Thanks for pointing me in the right direction, and also giving me the assurance that a data directory can indeed be moved without redoing initdb. Karen
В списке pgsql-general по дате отправления: