mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
The session_replication_role actually can be changed at will during
a session regardless of the existence of cached plans. The plancache only needs to be invalidated so that rules affected by the new setting will be reflected in the new query plans. Jan
This commit is contained in:
13
src/backend/utils/cache/plancache.c
vendored
13
src/backend/utils/cache/plancache.c
vendored
@ -33,7 +33,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.9 2007/05/14 18:13:21 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/cache/plancache.c,v 1.10 2007/06/05 20:00:41 wieck Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -944,14 +944,3 @@ InvalRelid(Oid relid, LOCKMODE lockmode, InvalRelidContext *context)
|
||||
if (relid == context->inval_relid || context->inval_relid == InvalidOid)
|
||||
context->plan->dead = true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* HaveCachedPlans
|
||||
* Check if the plancache has stored any plans at all.
|
||||
*/
|
||||
bool
|
||||
HaveCachedPlans(void)
|
||||
{
|
||||
return (cached_plans_list != NIL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user