aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-07-17 03:32:14 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-07-17 03:32:14 +0000
commitfe548629c50b753e96515ba2cfd8a85e8fba10de (patch)
treee80b54f71cb7868db3f9f9c97bccf4c48859951a /src/backend/tcop/postgres.c
parentf4c069ca8fc80640bd1bff510697371ffaf45267 (diff)
downloadpostgresql-fe548629c50b753e96515ba2cfd8a85e8fba10de.tar.gz
postgresql-fe548629c50b753e96515ba2cfd8a85e8fba10de.zip
Invent ResourceOwner mechanism as per my recent proposal, and use it to
keep track of portal-related resources separately from transaction-related resources. This allows cursors to work in a somewhat sane fashion with nested transactions. For now, cursor behavior is non-subtransactional, that is a cursor's state does not roll back if you abort a subtransaction that fetched from the cursor. We might want to change that later.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 54ba0a1fe6f..36fb347de3e 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.423 2004/07/11 00:18:44 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.424 2004/07/17 03:29:00 tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -2797,6 +2797,12 @@ PostgresMain(int argc, char *argv[], const char *username)
debug_query_string = NULL;
/*
+ * If there's an active portal, mark it as failed
+ */
+ if (ActivePortal)
+ ActivePortal->status = PORTAL_FAILED;
+
+ /*
* Make sure we are in a valid memory context during recovery.
*
* We use ErrorContext in hopes that it will have some free space