Craig Ringer <craig@xxxxxxxxxxxxxxxxxxxxx> writes: > On 28/07/11 18:06, Gavrina, Irina wrote: >> Is there any risk of losing of data or data corruption in this case? > Possibly, if you then remove postmaster.pid, thus bypassing the other > safety, and start a new postmaster. > I'm a bit alarmed to discover that Ubuntu's postgresql packaging appears > to do exactly this. > ... > It merrily removes the pid file without any effort to check if there are > backends using that datadir, then goes on to relaunch the postmaster. > Is this sane? Safe? No, and no. The postmaster is capable of removing the old pidfile if it really is stale, and any scripted substitute for that is highly likely to be unsafe. You do have to be a bit careful about how you code the script though, to ensure that the postmaster won't see false positives. Martin, is that code your responsibility? regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general