Re: [PATCH] add concurrent_abort callback for output plugin - Mailing list pgsql-hackers

From Markus Wanner
Subject Re: [PATCH] add concurrent_abort callback for output plugin
Date
Msg-id 4b842054-264a-4e9a-6ece-42641eac7b78@enterprisedb.com
Whole thread Raw
In response to Re: [PATCH] add concurrent_abort callback for output plugin  (Ajin Cherian <itsajin@gmail.com>)
Responses Re: [PATCH] add concurrent_abort callback for output plugin
List pgsql-hackers
On 30.03.21 09:39, Ajin Cherian wrote:
> Where do you suggest this be documented? From an externally visible 
> point of view, I dont see much of a surprise.

If you start to think about the option of committing a prepared 
transaction from a different node, the danger becomes immediately 
apparent:  A subscriber doesn't even know that the transaction is not 
complete.  How could it possibly know it's futile to COMMIT PREPARE it? 
  I think it's not just surprising, but outright dangerous to pretend 
having prepared the transaction, but potentially miss some of the changes.

(Essentially: do not assume the ROLLBACK PREPARED will make it to the 
subscriber.  There's no such guarantee.  The provider may crash, burn, 
and vanish before that happens.)

So I suggest to document this as a caveat for the prepare callback, 
because with this patch that's the callback which may be invoked for an 
incomplete transaction without the output plugin knowing.

Regards

Markus



pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: Idea: Avoid JOINs by using path expressions to follow FKs
Next
From: Pavel Stehule
Date:
Subject: Re: Idea: Avoid JOINs by using path expressions to follow FKs