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

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32pgsql-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

pgsql-hackers by date

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

pgsql-patches by date

Next:From: Claudio NatoliDate: 2003-12-14 23:15:00
Subject: Re: fork/exec patch
Previous:From: Bruce MomjianDate: 2003-12-14 22:21:48
Subject: Re: fork/exec patch

pgsql-hackers-win32 by date

Next:From: Claudio NatoliDate: 2003-12-14 23:15:00
Subject: Re: fork/exec patch
Previous:From: Bruce MomjianDate: 2003-12-14 22:21:48
Subject: Re: fork/exec patch

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