Re: [HACKERS] logical decoding of two-phase transactions

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Nikhil Sontakke <nikhils(at)2ndquadrant(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Sokolov Yura <y(dot)sokolov(at)postgrespro(dot)ru>, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Date: 2018-03-29 22:23:00
Message-ID: 0925358a-e11d-51bc-c3c1-959ded75f604@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 03/29/2018 11:58 PM, Andres Freund wrote:
> On 2018-03-29 23:52:18 +0200, Tomas Vondra wrote:
>>> I have added details about this in src/backend/storage/lmgr/README as
>>> suggested by you.
>>>
>>
>> Thanks. I think the README is a good start, but I think we also need to
>> improve the comments, which is usually more detailed than the README.
>> For example, it's not quite acceptable that LogicalLockTransaction and
>> LogicalUnlockTransaction have about no comments, especially when it's
>> meant to be public API for decoding plugins.
>
> FWIW, for me that's ground to not accept the feature. Burdening output
> plugins with this will make their development painful (because they'll
> have to adapt regularly) and correctness doubful (there's nothing
> checking for the lock being skipped). Another way needs to be found.
>

The lack of docs/comments, or the fact that the decoding plugins would
need to do some lock/unlock operation?

I agree with the former, of course - docs are a must. I disagree with
the latter, though - there have been about no proposals how to do it
without the locking. If there are, I'd like to hear about it.

FWIW plugins that don't want to decode in-progress transactions don't
need to do anything, obviously.

regards

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-03-29 22:24:41 Re: [HACKERS] logical decoding of two-phase transactions
Previous Message Andres Freund 2018-03-29 22:19:37 Re: Proposal: http2 wire format