Re: [HACKERS] Logical replication in the same cluster - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Logical replication in the same cluster
Date
Msg-id dba44a22-be96-b495-7b2e-f7ed6c7bfaac@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Logical replication in the same cluster  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] Logical replication in the same cluster  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
List pgsql-hackers
On 4/30/17 20:31, Andres Freund wrote:
> On 2017-04-26 23:41:51 +0200, Petr Jelinek wrote:
>> Yes that's result of how logical replication slots work, the transaction
>> that needs to finish is your transaction. It can be worked around by
>> creating the slot manually via the SQL interface for example and create
>> the subscription using WITH (NOCREATE SLOT, SLOT NAME = 'your slot') .
> 
> Is there any chance the creation of the slot could be moved ahead, to
> before an xid has been assigned?

The trend has rather been to do most of the stuff before creating the
slot, so that all the error checking is done.  See for example
dcb39c37c1d3b90115e1501af8efb7af59c341c3.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] A design for amcheck heapam verification
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] A design for amcheck heapam verification