aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 2135c92fd80..a43478088f9 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.486 2006/04/25 00:25:18 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.487 2006/06/11 15:49:28 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -3344,12 +3344,18 @@ PostgresMain(int argc, char *argv[], const char *username)
/* start an xact for this function invocation */
initialize_command();
+ /*
+ * Note: we may at this point be inside an aborted
+ * transaction. We can't throw error for that until
+ * we've finished reading the function-call message, so
+ * HandleFunctionRequest() must check for it after doing so.
+ * Be careful not to do anything that assumes we're inside a
+ * valid transaction here.
+ */
+
/* switch back to message context */
MemoryContextSwitchTo(MessageContext);
- /* set snapshot in case function needs one */
- ActiveSnapshot = CopySnapshot(GetTransactionSnapshot());
-
if (HandleFunctionRequest(&input_message) == EOF)
{
/* lost frontend connection during F message input */