pgsql: Fix Assert failure when a fastpath function call is attempted

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix Assert failure when a fastpath function call is attempted
Date: 2006-06-11 15:49:36
Message-ID: 20060611154936.430559FA5C3@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/src/backend/tcop:
fastpath.c (r1.83.2.1 -> r1.83.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/fastpath.c.diff?r1=1.83.2.1&r2=1.83.2.2)
postgres.c (r1.468.2.4 -> r1.468.2.5)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c.diff?r1=1.468.2.4&r2=1.468.2.5)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-06-11 15:49:46 pgsql: Fix Assert failure when a fastpath function call is attempted
Previous Message Tom Lane 2006-06-11 15:49:28 pgsql: Fix Assert failure when a fastpath function call is attempted