Re: [PATCH] Fix CommitTransactionCommand() to CallXactCallbacks() inTBLOCK_ABORT_END - Mailing list pgsql-hackers

From Dave Sharpe
Subject Re: [PATCH] Fix CommitTransactionCommand() to CallXactCallbacks() inTBLOCK_ABORT_END
Date
Msg-id 9D927F5D-CCD5-4416-AACA-FBA004BD7119@lzlabs.com
Whole thread Raw
In response to Re: [PATCH] Fix CommitTransactionCommand() to CallXactCallbacks() inTBLOCK_ABORT_END  (Gilles Darold <gilles@darold.net>)
List pgsql-hackers

From Gilles Darold <gilles@darold.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

pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: PATCH: add support for IN and @> in functional-dependencystatistics use
Next
From: Ranier Vilela
Date:
Subject: [PATCH'] Variables assigned with values that is never used.