summaryrefslogtreecommitdiff
path: root/src/backend/access/transam
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-08-17 22:14:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-08-17 22:14:34 +0000
commitf8d0a82bf9501e1c5efe40e0f55d0c063858f7b4 (patch)
tree4321c1bfc1db0765273c00ba8ef3531f6ab512c7 /src/backend/access/transam
parent63f850cd4dd3894cf9990f899f2792fae77fdfb8 (diff)
downloadpostgresql-f8d0a82bf9501e1c5efe40e0f55d0c063858f7b4.tar.gz
Avoid an Assert failure if OuterUserId hasn't been set yet during
AbortTransaction. This can happen if a backend's InitPostgres transaction fails (eg, because the given username is invalid). Per Alvaro.
Diffstat (limited to 'src/backend/access/transam')
-rw-r--r--src/backend/access/transam/xact.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 5323cefe0e..737d1f3252 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.212 2005/08/08 19:17:22 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.213 2005/08/17 22:14:33 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1877,8 +1877,8 @@ AbortTransaction(void)
/*
* Reset user id which might have been changed transiently. We cannot
- * use s->currentUser, but must get the session outer-level userid from
- * miscinit.c.
+ * use s->currentUser, since it may not be set yet; instead rely on
+ * internal state of miscinit.c.
*
* (Note: it is not necessary to restore session authorization here
* because that can only be changed via GUC, and GUC will take care of
@@ -1886,7 +1886,7 @@ AbortTransaction(void)
* DEFINER function could send control here with the wrong current
* userid.)
*/
- SetUserId(GetOuterUserId());
+ AtAbort_UserId();
/*
* do abort processing