mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Fix Assert failure in PushOverrideSearchPath when trying to restore a search
path that specifies useTemp, but there is no active temp schema in the current session. (This can happen if the path was saved during a transaction that created a temp schema and was later rolled back.) For existing callers it's sufficient to ignore the useTemp flag in this case, though we might later want to offer an option to create a fresh temp schema. So far as I can tell this is just an Assert failure: in a non-assert build, the code would push a zero onto the new search path, which is useless but not very harmful. Per bug report from Heikki. Back-patch to 8.3; prior versions don't have this code.
This commit is contained in:
4
src/backend/utils/cache/plancache.c
vendored
4
src/backend/utils/cache/plancache.c
vendored
@ -35,7 +35,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.27.2.2 2010/01/13 16:57:03 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.27.2.3 2010/08/13 16:27:28 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -470,6 +470,8 @@ RevalidateCachedPlan(CachedPlanSource *plansource, bool useResOwner)
|
||||
|
||||
/*
|
||||
* Restore the search_path that was in use when the plan was made.
|
||||
* See comments for PushOverrideSearchPath about limitations of this.
|
||||
*
|
||||
* (XXX is there anything else we really need to restore?)
|
||||
*/
|
||||
PushOverrideSearchPath(plansource->search_path);
|
||||
|
Reference in New Issue
Block a user