Re: [HACKERS] logical decoding of two-phase transactions - Mailing list pgsql-hackers

From Nikhil Sontakke
Subject Re: [HACKERS] logical decoding of two-phase transactions
Date
Msg-id C4BBE697-D7E9-4DCE-80CA-D831D45CADCD@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] logical decoding of two-phase transactions  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers


>
> Quick thought: Should be simple to release lock when interacting with network.

I don’t think this will be that simple. The network calls will typically happen from inside the plugins and we don’t
wantto make plugin authors responsible for that.  

> Could also have abort signal lockers.

With the decodegroup locking we do have access to all the decoding backend pids. So we could signal them. But am not
suresignaling will work if the plugin is in the midst of a network 
Call.

I agree with Petr. With this decodegroup
Lock implementation we have an inexpensive but workable implementation for locking around the plugin call. Sure, the
abortwill be penalized but it’s bounded by the Wal sender timeout or a max of one change apply cycle. 
As he mentioned if we can optimize this later we can do so without changing plugin coding semantics later.

Regards,
Nikhils

>
> Andres
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] AdvanceXLInsertBuffer vs. WAL segment compressibility
Next
From: Tom Lane
Date:
Subject: Re: lo_import() of an empty file