Re: [GENERAL] Clearing plans

2007-01-19 Thread Scott Ribe
> d'oh! that was just a transcription error though...if you create f() > returning bigint and immutable it produces the same results. So I see. But... pedcard=# create function f2() returns boolean as $$ begin return 't'; end; $$ language plpgsql immutable; CREATE FUNCTION pedcard=# create funct

Re: [GENERAL] Clearing plans

2007-01-19 Thread Merlin Moncure
On 1/19/07, Scott Ribe <[EMAIL PROTECTED]> wrote: > Also, somebody correct me if I'm off my rocker here, but immutable > procedures are re-evaluated for each execution...they are just folded > into a constant during plan phase. You would need to actually create an immutable function in order to

Re: [GENERAL] Clearing plans

2007-01-19 Thread Scott Ribe
> Also, somebody correct me if I'm off my rocker here, but immutable > procedures are re-evaluated for each execution...they are just folded > into a constant during plan phase. You would need to actually create an immutable function in order to test how immutable functions work ;-) And apparently

Re: [GENERAL] Clearing plans

2007-01-19 Thread Merlin Moncure
On 1/18/07, Scott Ribe <[EMAIL PROTECTED]> wrote: Is there a way to force a flush of all cached plans? Particularly, to force re-evaluation of immutable stored procedures? Don't worry, it's a testing & development thing, not something I want to do during production ;-) Also, somebody correct me

Re: [GENERAL] Clearing plans

2007-01-19 Thread Jeff Davis
On Thu, 2007-01-18 at 12:21 -0700, Scott Ribe wrote: > > Start a fresh connection. > > OK. Better than having to restart the whole server, which is what I was > doing... > Just to clarify, you don't have to restart the whole server. All you have to do is disconnect the client, and reconnect. Re

Re: [GENERAL] Clearing plans

2007-01-19 Thread Tom Lane
Martijn van Oosterhout writes: > On Thu, Jan 18, 2007 at 10:08:24PM +0100, Peter Kovacs wrote: >> Are the plans cached per connection? Why not globally? > Because global plan caching is much harder and nobody has done it yet? The idea's been discussed before, and there are at least three problem

Re: [GENERAL] Clearing plans

2007-01-19 Thread Martijn van Oosterhout
On Thu, Jan 18, 2007 at 10:08:24PM +0100, Peter Kovacs wrote: > Are the plans cached per connection? Why not globally? Because global plan caching is much harder and nobody has done it yet? If you use something like pgpool, you ofcourse get the advantages of cached plans across multiple sessions,

Re: [GENERAL] Clearing plans

2007-01-18 Thread Peter Kovacs
Are the plans cached per connection? Why not globally? Thanks Peter On 1/18/07, Tom Lane <[EMAIL PROTECTED]> wrote: Scott Ribe <[EMAIL PROTECTED]> writes: > Is there a way to force a flush of all cached plans? Start a fresh connection. regards, tom lane --

Re: [GENERAL] Clearing plans

2007-01-18 Thread Scott Ribe
> Start a fresh connection. OK. Better than having to restart the whole server, which is what I was doing... -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ---(end of broadcast)--- TIP 6: explain analyze is your

Re: [GENERAL] Clearing plans

2007-01-18 Thread Tom Lane
Scott Ribe <[EMAIL PROTECTED]> writes: > Is there a way to force a flush of all cached plans? Start a fresh connection. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Clearing plans

2007-01-18 Thread Scott Ribe
Is there a way to force a flush of all cached plans? Particularly, to force re-evaluation of immutable stored procedures? Don't worry, it's a testing & development thing, not something I want to do during production ;-) -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 v