Re: pg_upgrade improvements - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pg_upgrade improvements
Date
Msg-id CABUevEy9ztwidT-LPci_+HMTRxcjzmPQsrPY+aqEbNfL3KJU8g@mail.gmail.com
Whole thread Raw
In response to Re: pg_upgrade improvements  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Apr 5, 2012 at 17:34, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Stephen Frost <sfrost@snowman.net> writes:
>> * Andres Freund (andres@anarazel.de) wrote:
>>> Why would pipes be more useful? Its not like you could build useful pipelines
>>> with them.
>
>> The point is to avoid the risk that someone else could connect to the
>> database at the same time you're doing work on it.
>
> Right.  Unless I misunderstand the semantics of named pipes on Windows,
> we don't want that because in principle some unrelated process could
> connect to it as soon as you set it up.

By default it does, and that's what we're using it for (pg_ctl kill).
That can be handled with permissions and counters, I think.

But more importantly in this case, you cannot communicate across a
named pipe on windows with the normal socket calls send() and recv().
You have to use the Windows API file calls like ReadFile() and
WriteFile(). So it would require some rather major surgery to use
that.

This is why the pgpipe implementation we had used a socketpair instead
of named pipes.



--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Another review of URI for libpq, v7 submission
Next
From: Dimitri Fontaine
Date:
Subject: Re: Finer Extension dependencies