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