Re: [HACKERS] More race conditions in logical replication - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] More race conditions in logical replication
Date
Msg-id 20170712224828.iphg5ttm2h6egm3d@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] More race conditions in logical replication  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Responses Re: [HACKERS] More race conditions in logical replication
Re: [HACKERS] More race conditions in logical replication
List pgsql-hackers
Petr Jelinek wrote:

> So best idea I could come up with is to make use of the new condition
> variable API. That lets us wait for variable which can be set per slot.

Here's a cleaned up version of that patch, which I intend to get in the
tree tomorrow.  I verified that this allows the subscription tests to
pass with Tom's sleep additions.

I noticed one point where we're reading the active_pid without locking;
marked it with an XXX comment.  Not yet sure whether this is a bug or
not.


I noticed something funny in CREATE_REPLICATION; apparently we first
create a slot and set it active, then we activate it by name.  With the
current coding it seems to work fine, because we're careful to make
activation idempotent, but it looks convoluted.  I don't think this is
new, though.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: [HACKERS] New partitioning - some feedback
Next
From: Greg Stark
Date:
Subject: Re: [HACKERS] building libpq.a static library