(2014/12/08 15:17), Ashutosh Bapat wrote:
> On Sat, Dec 6, 2014 at 9:21 PM, Noah Misch <noah@leadboat.com
> <mailto:noah@leadboat.com>> wrote:
> Does this inheritance patch add any
> atomicity
> problem that goes away when one breaks up the inheritance hierarchy and
> UPDATEs each table separately? If not, this limitation is okay.
> If the UPDATES crafted after breaking up the inheritance hierarchy are
> needed to be run within the same transaction (as the UPDATE on
> inheritance hierarchy would do), yes, there is atomicity problem.
ISTM that your concern would basically a known problem. Consider the
following transaction.
BEGIN TRANSACTION;
UPDATE foo SET a = 100; -- updates on table foo in remote server1
UPDATE bar SET a = 100; -- updates on table bar in remote server2
COMMIT TRANSACTION;
This transaction would cause the atomicity problem if
pgfdw_xact_callback() for XACT_EVENT_PRE_COMMIT for foo succeeded and
then that for bar failed during CommitTransaction().
Thanks,
Best regards,
Etsuro Fujita