Re: [PATCH] Fix CommitTransactionCommand() to CallXactCallbacks() in TBLOCK_ABORT_END

From: Dave Sharpe <dave(dot)sharpe(at)lzlabs(dot)com>
To: Gilles Darold <gilles(at)darold(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Fix CommitTransactionCommand() to CallXactCallbacks() in TBLOCK_ABORT_END
Date: 2020-03-28 13:23:48
Message-ID: 9D927F5D-CCD5-4416-AACA-FBA004BD7119@lzlabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From Gilles Darold <gilles(at)darold(dot)net> on 2020-03-26T16:09:04.
> Actually the callback function is called when the error is thrown:

> psql:eat_rollback2.sql:20: INFO: 00000: myTransactionCallback() XactEvent 2 (is abort) level 1 <-----------------
> LOCATION: myTransactionCallback, eat_rollback.c:52
> psql:eat_rollback2.sql:20: ERROR: XX000: no no no
> LOCATION: mySubtransactionCallback, eat_rollback.c:65

> this is probably why the callback is not called on the subsequent ROLLBACK execution because abort processing is
> already done (src/backend/access/transam/xact.c:3890).
So I withdraw this patch and fix. The callback during the error will drive the ROLLBACK remote, as required in the fdw.
Great catch, thanks Gilles!

Cheers,
Dave

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2020-03-28 13:33:23 [PATCH'] Variables assigned with values that is never used.
Previous Message Dean Rasheed 2020-03-28 13:18:17 Re: PATCH: add support for IN and @> in functional-dependency statistics use