Re: EXEC_BACKEND

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: EXEC_BACKEND
Date: 2008-09-16 19:53:11
Message-ID: 15918.1221594791@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> We keep talking about EXEC_BACKEND mode, though until recently I had
> misunderstood what that meant. I also realised that I have more than
> once neglected to take it into account when writing a patch - one recent
> patch failed to do this.

> I can't find anything coherent in docs/readme/comments to explain why it
> exists and what its implications are.

It exists because Windows doesn't have fork(), only the equivalent of
fork-and-exec. Which means that no state variables will be inherited
from the postmaster by its child processes, and any state that needs to
be carried across has to be handled explicitly. You can define
EXEC_BACKEND in a non-Windows build, for the purpose of testing code
to see if it works in that environment.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ron Mayer 2008-09-16 20:29:01 Patch for SQL-standard negative valued year-month literals
Previous Message Tom Lane 2008-09-16 19:45:18 Re: [HACKERS] Infrastructure changes for recovery