Re: why not kill -9 postmaster

From: "Dawid Kuroczko" <qnex42(at)gmail(dot)com>
To: "Shane Ambler" <pgsql(at)007marketing(dot)com>
Cc: "Andreas Seltenreich" <andreas+pg(at)gate450(dot)dyndns(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: why not kill -9 postmaster
Date: 2006-10-20 14:28:08
Message-ID: 758d5e7f0610200728uf0c0841oee77573c2ef5a7f4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/20/06, Shane Ambler <pgsql(at)007marketing(dot)com> wrote:

> >> After all, that's what a system crash is, right?
> >
> > A system crash is safer in that it won't leave orphaned child
> > processes or IPC/synchronization resources around, making it more
> > comparable to a SIGQUIT than a SIGKILL.
> >
>
> The one thing worse than kill -9 the postmaster is pulling the power
> cord out of the server. Which is what makes UPS's so good.

Well, I think that pulling the power cord is much safer than killing -9
the postmaster. If you pull the plug, then during bootup postgresql
will just replay every COMMITed transaction, so there won't be any
dataloss or downtime.

If you kill -9 postmaster... well, it's messy. ;-))) I feel safer when
everything goes down at the same time. ;)

> If your server is changing the data file on disk and you pull the power
> cord, what chance do you expect of reading that data file again?

With PostgreSQL? I expect to read all commited transactions. And
those not commited... well, they weren't commited in the first place,
so I won't see them anyway.

This is all in assumption that you are running your DB with fsync on,
on a reliable filesystem, and your hardware doesn't lie to you about
fsyncing data (and it's best if you have a battery for controller's cache).

Regards,
Dawid

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ian Harding 2006-10-20 14:45:26 Re: why not kill -9 postmaster
Previous Message Tom Lane 2006-10-20 14:18:41 Re: why not kill -9 postmaster