Re: fork/exec patch

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: 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-14 22:40:09
Message-ID: Pine.LNX.4.44.0312142329580.10157-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

On Sun, 14 Dec 2003, Bruce Momjian wrote:

> > Why not use an anonymous pipe to send data from the parent to the child
> > process?
>
> Doesn't that require the postmaster to stay around to feed that
> information into the pipe or can the postmaster just shove the data and
> continue on, and how do the old pipes get cleaned up?

I think that one can just output the data and close that end of the pipe.
But i've not looked at win32 the last 5 years or so, I could be wrong.

> Seems messy.

Maybe, but to me the solution where you write to files are much more ugly.
If one does not like pipes, there are other ipc mechanisms that does not
involve creating, reading and deleting a file on each connect.

Does windows have a temp filesystem where the temp files are not actually
written out on disk? It's still ugly but better then hitting a disk all
the time.

> Also has to work on Unix too for testing.

Everything can not work in unix, CreateProcess() and fork() are different.
However, the pipe solution can be mimiced in unix, but it will not be the
same code since the api's are different. So that does not give much.

--
/Dennis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-12-14 23:02:37 Re: Resurrecting pg_upgrade
Previous Message Bruce Momjian 2003-12-14 22:21:48 Re: fork/exec patch

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Claudio Natoli 2003-12-14 23:15:00 Re: fork/exec patch
Previous Message Bruce Momjian 2003-12-14 22:21:48 Re: fork/exec patch

Browse pgsql-patches by date

  From Date Subject
Next Message Claudio Natoli 2003-12-14 23:15:00 Re: fork/exec patch
Previous Message Bruce Momjian 2003-12-14 22:21:48 Re: fork/exec patch