Skip site navigation (1) Skip section navigation (2)

Re: function cache effect still happening?

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Fernando Moreno" <azazel(dot)7(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: function cache effect still happening?
Date: 2008-05-30 13:37:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Mon, May 26, 2008 at 3:08 PM, Fernando Moreno <azazel(dot)7(at)gmail(dot)com> wrote:
> On the other hand, perhaps this problem could have been avoided by creating
> the same function in every schema. That way the function cache and query
> plans would be harmless. Am I right?

yes. I have done partitioning exactly you have several time in the's pretty powerful.

You can also force a reconnect when you manipulate search_path.  I
personally think adding the same function to every schema is lame and
would prefer reconnect if you can fit it in.  Of course, you can also
use dynamic sql everywhere but this also has drawbacks.

There has been some consensus on solving this problem...namely to have
the stored plans to be hashed out over search path (so, if your
database has 10 identical schemas, you could have up to 10 stored
plans for each function).   btw, prepared statements are also an


In response to

pgsql-general by date

Next:From: Jon LaphamDate: 2008-05-30 14:06:02
Subject: Mediawiki 1.10 and PG 8.3 upgrade
Previous:From: A BDate: 2008-05-30 12:49:20
Subject: Connection problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group