Re: Re: low performance - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Re: low performance
Date
Msg-id 5995.999545711@sss.pgh.pa.us
Whole thread Raw
In response to low performance  (Andreas Wernitznig <andreas@insilico.com>)
List pgsql-bugs
Andreas Wernitznig <andreas@insilico.com> writes:
> The only way to make it faster after step 3 is to close that connection (and stop that postmaster thread with it) and
establisha new one. 
> It seems like the planner (at least for pk checking) of an *established* connection to a database doesn't receive the
informationgained from "vacuum analyze". 

Ah.  Yes, you are quite right: the queries used for PK checking are
planned just once when first executed, and thereafter the plans are
cached and reused for the life of that backend.  No doubt you are seeing
continued use of a no-longer-appropriate PK plan.

We have a TODO item to be smarter about dropping cached plans when
relevant context changes, but it's not done yet.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: low performance
Next
From: Andreas Wernitznig
Date:
Subject: Re: Re: low performance