Re: pg_upgrade improvements

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>, Harold Giménez <harold(dot)gimenez(at)gmail(dot)com>
Subject: Re: pg_upgrade improvements
Date: 2012-04-05 16:58:33
Message-ID: CABUevEy9ztwidT-LPci_+HMTRxcjzmPQsrPY+aqEbNfL3KJU8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 5, 2012 at 17:34, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
>> * Andres Freund (andres(at)anarazel(dot)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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2012-04-05 16:58:55 Re: Finer Extension dependencies
Previous Message Peter Eisentraut 2012-04-05 16:52:13 Re: Another review of URI for libpq, v7 submission