pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Petr Jelinek <petr.jelinek@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
To: Nikhil Sontakke <nikhil.sontakke@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org, Nikhil Sontakke <nikhils@2ndquadrant.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Craig Ringer <craig@2ndquadrant.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: Sokolov Yura <y.sokolov@postgrespro.ru>
Cc: Stas Kelvich <s.kelvich@postgrespro.ru>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Date: Fri, 30 Mar 2018 21:05:29 +0200
Message-ID: <3cca7c66-2a5e-a3c1-a197-9bb107e0b69f@2ndquadrant.com> (raw)
In-Reply-To: <20180330185037.ehgvu4lplcgwekqr@alap3.anarazel.de>
References: <CAMGcDxf9HHmDOti4-DSQTtGo48R4OMki+BktPn2uTOtGr4XomQ@mail.gmail.com>
	<c167340c-0751-d54b-0f32-fa83fd414863@2ndquadrant.com>
	<CAMGcDxcGtRXtF1r3VqddzHba+BTm7q8wbgEsyhmOFuDckMTZFQ@mail.gmail.com>
	<dd5a9cb7-bb10-cb5c-834e-08dc3ffc057f@2ndquadrant.com>
	<20180329215815.36xxakgujx4luo4m@alap3.anarazel.de>
	<ff89e6f0-baae-fd4f-6565-13e7c2f23b90@2ndquadrant.com>
	<CAMGcDxdboSU8cyNoCav7Qpa_U5FVqhTnb+cbnDa6=kL=3KWoXg@mail.gmail.com>
	<f92d74fe-0e55-4c9b-a342-4c134591f1be@2ndquadrant.com>
	<1750517D-1FC6-4C9E-845B-918B6E275A03@anarazel.de>
	<C4BBE697-D7E9-4DCE-80CA-D831D45CADCD@2ndquadrant.com>
	<20180330185037.ehgvu4lplcgwekqr@alap3.anarazel.de>

On 30/03/18 20:50, Andres Freund wrote:
> Hi,
> 
> On 2018-03-30 23:49:43 +0530, Nikhil Sontakke wrote:
>>> 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 want to make
>> plugin authors responsible for that.
> 
> You can just throw results away... ;). I'm not even kidding.  We've all
> the necessary access in the callback for writing from a context.
>

You mean, if we detect abort in the write callback, set something in the
context which will make all the future writes noop until it's reset
again after we yield back to the logical decoding?

That's not the most beautiful design I've seen, but I'd be okay with
that, it seems like it would solve all the issues we have with this.

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




view thread (644+ messages)  latest in thread

Message-ID: <3cca7c66-2a5e-a3c1-a197-9bb107e0b69f@2ndquadrant.com>
Permalink:  ../3cca7c66-2a5e-a3c1-a197-9bb107e0b69f@2ndquadrant.com/
Also on:    postgresql.org/message-id/3cca7c66-2a5e-a3c1-a197-9bb107e0b69f@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: petr.jelinek@2ndquadrant.com, andres@anarazel.de, nikhil.sontakke@2ndquadrant.com, nikhils@2ndquadrant.com, tomas.vondra@2ndquadrant.com, craig@2ndquadrant.com, peter.eisentraut@2ndquadrant.com, simon@2ndquadrant.com, y.sokolov@postgrespro.ru, s.kelvich@postgrespro.ru, 9erthalion6@gmail.com, tgl@sss.pgh.pa.us, sawada.mshk@gmail.com, robertmhaas@gmail.com
  Subject: Re: [HACKERS] logical decoding of two-phase transactions
  In-Reply-To: <3cca7c66-2a5e-a3c1-a197-9bb107e0b69f@2ndquadrant.com>
  References: <CAMGcDxf9HHmDOti4-DSQTtGo48R4OMki+BktPn2uTOtGr4XomQ@mail.gmail.com> <c167340c-0751-d54b-0f32-fa83fd414863@2ndquadrant.com> <CAMGcDxcGtRXtF1r3VqddzHba+BTm7q8wbgEsyhmOFuDckMTZFQ@mail.gmail.com> <dd5a9cb7-bb10-cb5c-834e-08dc3ffc057f@2ndquadrant.com> <20180329215815.36xxakgujx4luo4m@alap3.anarazel.de> <ff89e6f0-baae-fd4f-6565-13e7c2f23b90@2ndquadrant.com> <CAMGcDxdboSU8cyNoCav7Qpa_U5FVqhTnb+cbnDa6=kL=3KWoXg@mail.gmail.com> <f92d74fe-0e55-4c9b-a342-4c134591f1be@2ndquadrant.com> <1750517D-1FC6-4C9E-845B-918B6E275A03@anarazel.de> <C4BBE697-D7E9-4DCE-80CA-D831D45CADCD@2ndquadrant.com> <20180330185037.ehgvu4lplcgwekqr@alap3.anarazel.de> <3cca7c66-2a5e-a3c1-a197-9bb107e0b69f@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox