Re: postmaster.pid
От | Joerg Hessdoerfer |
---|---|
Тема | Re: postmaster.pid |
Дата | |
Msg-id | 20030103161210.E99084980D4@sea-gw.sea.com обсуждение исходный текст |
Ответ на | Re: postmaster.pid (am@fx.ro) |
Список | pgsql-general |
Hi, On Friday 03 January 2003 18:38, you wrote: > > > i think that somewhere in the docs the administators > > > should be advised to delete postmaster.pid automatically at boot > > > time ( for example at the same time when the files in /tmp are > > > deleted ). > > > This way, in case of an unexpected shutdown, postgresql would be > > > able to restart without any manual intervention. > > > > Well, this is a *BAD IDEA*. Suppose, for example, your data is corrupt in > > some special way, an due to your removal of the pid file, postmaster > > tries to recover the database automatically and probably destroys all or > > data part of the data. You would like to have been able to do a > > filseystem level backup first... > > Ooopss... it seems like i am too optimistic about such situations. > > Just wondering: if the database is so heavily damaged that the > postmaster would not be able to recover, are there any chances to > restore anything from a filesystem backup, manually ? > With a lot of work, sometimes... it all depends of how much the data is worth to (read: when did you do you last backup? ;-) > ......... > > Background: > - our team is working on a project for a small company. > - there will be one server and 3-4 clients > - It is the first time we use PostgreSQL. > - Little space. > - Many people around. > - No UPS (yet). > - unpredictable,untrained,desperate,'crazy' users > > Possible problems: > - the users will need time to learn how to use the program > ( until then they could do many mistakes, such as turning off the > server before leaving the office - without issueing the proper > shutdown command, but simply pushing the power switch. ) > - someone might stumble over the cable and unplug the server by mistake. > Why should someone switch off a server at all? Except for maintenance or repair? > Questions: > How resistent is PostgreSQL to such shocks? > It never failed me after a crash. But I don't push it... (I can remember only 3 crashes at all, and these were NOT PostgreSQL's fault!) > Are there alternative solutions to handling unexpected shutdowns > automatically? (except deleting postmaster.pid at boot time) > The best idea for your situation seems to be the advice: make automated backups as often as possible, to avoid too much data loss. Then you could go the route of 'delete pid file automatically'. If a really bad thing happens, you can always restore from tha last backup. > > > Best wishes, > > Adrian Maier > (am@fx.ro) > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org HTH, Joerg -- Leading SW developer - S.E.A GmbH Mail: joerg.hessdoerfer@sea-gmbh.com WWW: http://www.sea-gmbh.com
В списке pgsql-general по дате отправления: