BUG #17840: Failing to execute auto_explain for logging leads to transaction rollback. - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17840: Failing to execute auto_explain for logging leads to transaction rollback.
Date
Msg-id 17840-c480ed3600feea0e@postgresql.org
Whole thread Raw
Responses Re: BUG #17840: Failing to execute auto_explain for logging leads to transaction rollback.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17840
Logged by:          Sebastien Caunes
Email address:      bokanist@gmail.com
PostgreSQL version: 13.2
Operating system:   Linux
Description:

I had this problem when importing data from oracle with oracle_fdw and
auto_explain option set on the postgres server : If the query took too long,
it triggers the auto_explain wich queries things on oracle side where there
was a permission problem. The error bubble up outside of logging scope and
make the transaction rollback after having properly transferred dozen
million records (that then stood as dead tuples).

Logging is one thing with its own scope and it should never interfere with
the behavior of the software. Beside whatever reason triggering the error in
logging scope, the transaction that had no problem itself should not be
rollbacked. It makes no sense.

Isn't there something to refactor in Postgres ?


pgsql-bugs by date:

Previous
From: David Rowley
Date:
Subject: Re: BUG #17826: An assert failed in /src/backend/optimizer/util/var.c
Next
From: Tom Lane
Date:
Subject: Re: BUG #17840: Failing to execute auto_explain for logging leads to transaction rollback.