Re: file-locking and postmaster.pid
От | Andreas Joseph Krogh |
---|---|
Тема | Re: file-locking and postmaster.pid |
Дата | |
Msg-id | 200605241136.22497.andreak@officenet.no обсуждение исходный текст |
Ответ на | Re: file-locking and postmaster.pid (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: file-locking and postmaster.pid
|
Список | pgsql-hackers |
On Tuesday 23 May 2006 19:36, Tom Lane wrote: > Adis Nezirovic <adis@linux.org.ba> writes: > > Well, maybe you could tweak postgres startup script, add check for post > > master (either 'pgrep postmaster' or 'ps -axu | grep [p]ostmaster'), and > > delete pid file on negative results. > > This is exactly what you should NOT do. > > A start script that thinks it is smarter than the postmaster is almost > certainly wrong. It is certainly dangerous, too, because auto-deleting > that pidfile destroys the interlock against having two postmasters > running in the same data directory (which WILL corrupt your data, > quickly and irretrievably). All it takes to cause a problem is to > use the start script to start a postmaster, forgetting that you already > have one running ... My PG is not started with startup-scripts, but with this command: pg_ctl -D $PGDATA -l $PGDIR/log/logfile-`date +%Y-%m-%d`.log start -- Andreas Joseph Krogh <andreak@officenet.no> Senior Software Developer / Manager gpg public_key: http://dev.officenet.no/~andreak/public_key.asc ------------------------+---------------------------------------------+ OfficeNet AS | The most difficult thing in the world is to | Hoffsveien 17 | know how to do a thing and to watch | PO. Box 425 Skøyen | somebody else doing it wrong, without | 0213 Oslo | comment. | NORWAY | | Phone : +47 22 13 01 00 | | Direct: +47 22 13 10 03 | | Mobile: +47 909 56 963 | | ------------------------+---------------------------------------------+
В списке pgsql-hackers по дате отправления: