Re: fork/exec patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Neil Conway <neilc(at)samurai(dot)com>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, "'pgsql-patches(at)postgresql(dot)org'" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fork/exec patch
Date: 2003-12-15 03:14:48
Message-ID: 200312150314.hBF3Emf27049@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> > On Sun, Dec 14, 2003 at 06:53:22PM -0500, Tom Lane wrote:
> >> You can hardly claim that "no one had issues with that".
>
> > Don't the FSM and the system catalog cache use a similar mechanism?
>
> FSM uses a backing file to hold information over a database shutdown
> (write once during shutdown, read once during startup). That's a little
> different from once per backend fork. Also, there are no race
> conditions to worry about, and finally the system does not *require* the
> backing file to be either present or correct.
>
> The catalog cache uses a file that typically gets updated once per
> VACUUM. Again, the file does not have to be present, nor correct.
> There are mechanisms in place to deal with the cases (including race
> conditions) where it's broken or obsolete.
>
> I have not looked at the proposed fork/exec code in any detail, but
> IIUC it will be *necessary* that the intermediate file be present, and
> correct. I think a minimum requirement for accepting this solution is a
> sketch of how race conditions will be dealt with (ie, postmaster changes
> its own value of some variable immediately after making the temp file).
> I don't necessarily say that the first-cut patch has to get it right,
> but we'd better understand how we will get to where it is right.

Agreed, added to the Win32 status page:

* remove per-backend parameter file and move into shared memory

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-12-15 03:16:27 Re: [PATCHES] fork/exec patch
Previous Message Tom Lane 2003-12-15 03:00:14 Re: ORDER BY and DISTINCT ON

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2003-12-15 03:16:27 Re: [PATCHES] fork/exec patch
Previous Message Tom Lane 2003-12-15 00:14:53 Re: fork/exec patch

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-12-15 03:16:27 Re: [PATCHES] fork/exec patch
Previous Message Christopher Kings-Lynne 2003-12-15 02:18:37 Re: minor SGML improvements