Re: Logical Replication WIP

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Steve Singer <steve(at)ssinger(dot)info>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logical Replication WIP
Date: 2016-11-13 04:16:56
Message-ID: d4eec0b3-c203-870f-874c-76ec65410b1e@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 12/11/16 20:19, Andres Freund wrote:
> On 2016-11-10 23:31:27 +0100, Petr Jelinek wrote:
>> On 04/11/16 13:15, Andres Freund wrote:
>>>
>>> /* Prototypes for private functions */
>>> -static bool libpq_select(int timeout_ms);
>>> +static bool libpq_select(PGconn *streamConn,
>>> + int timeout_ms);
>>>
>>> If we're starting to use this more widely, we really should just a latch
>>> instead of the plain select(). In fact, I think it's more or less a bug
>>> that we don't (select is only interruptible by signals on a subset of
>>> our platforms). That shouldn't bother this patch, but...
>>>
>>>
>>
>> Agree that this is problem, especially for the subscription creation
>> later. We should be doing WaitLatchOrSocket, but the question is which
>> latch. We can't use MyProc one as that's not the latch that WalReceiver
>> uses so I guess we would have to send latch as parameter to any caller
>> of this which is not very pretty from api perspective but I don't have
>> better idea here.
>
> I think we should simply make walsender use the standard proc
> latch. Afaics that should be fairly trivial?

Walreceiver you mean. Yeah that should be simple, looking at the code I
am not quite sure why it uses separate latch in the first place.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2016-11-13 05:16:28 Re: Proposal: scan key push down to heap [WIP]
Previous Message Peter Eisentraut 2016-11-13 03:06:39 Re: WAL consistency check facility