Skip site navigation (1) Skip section navigation (2)

Re: fork/exec patch: pre-CreateProcess finalization

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
Cc: "'Bruce Momjian '" <pgman(at)candle(dot)pha(dot)pa(dot)us>,"'Jan Wieck '" <JanWieck(at)Yahoo(dot)com>,"'pgsql-patches(at)postgreSQL(dot)org '" <pgsql-patches(at)postgreSQL(dot)org>
Subject: Re: fork/exec patch: pre-CreateProcess finalization
Date: 2004-01-09 06:36:43
Message-ID: 21280.1073630203@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
> Actually, if I was going to argue anything, I'd say that if a backend goes
> nuts and zeroes the whole shmem segment you've probably some bigger things
> to worry about (Aside: Would postgres actually recover from such an
> occurence? BTW, I'd be pretty impressed if it did, but not all that
> surprised ;-).

It should, although there are limits (for instance, if someone is
actively writing out a page of WAL at the same time the bogus backend
comes by and zeroes that buffer, you might lose WAL entries for
already-committed transactions, which would be unhappy-making).

As a developer, though, I crash backends all the time, and I can say
that this mechanism is indeed pretty robust.  The postmaster never goes
down (what, never? well, hardly ever) and it's *extremely* seldom that
a crash results in on-disk corruption, because the postmaster generally
manages to kill the other backends before any corruption in shared
memory gets propagated to disk.

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Zach IrmenDate: 2004-01-09 07:35:34
Subject: Re: psql \i handling ~ in specified file name
Previous:From: Claudio NatoliDate: 2004-01-09 06:26:39
Subject: Re: fork/exec patch: pre-CreateProcess finalization

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group