]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix Assert failure when a fastpath function call is attempted inside an
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 11 Jun 2006 15:49:36 +0000 (15:49 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 11 Jun 2006 15:49:36 +0000 (15:49 +0000)
commitb45f5bb7265a624a59f710fbabcd252ad2594b30
treea89b6debb4644c1c63877dbd8f42fe44fdd85690
parent98365a1e34eca9d1378afb9704d875f356c1ec86
Fix Assert failure when a fastpath function call is attempted inside an
already-aborted transaction block.  GetSnapshotData throws an Assert if
not in a valid transaction; hence we mustn't attempt to set a snapshot
for the function until after checking for aborted transaction.  This is
harmless AFAICT if Asserts aren't enabled (GetSnapshotData will compute
a bogus snapshot, but it doesn't matter since HandleFunctionRequest will
throw an error shortly anywy).  Hence, not a major bug.

Along the way, add some ability to log fastpath calls when statement
logging is turned on.  This could probably stand to be improved further,
but not logging anything is clearly undesirable.

Backpatched as far as 8.0; bug doesn't exist before that.
src/backend/tcop/fastpath.c
src/backend/tcop/postgres.c