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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-patches by date

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