Andreas Wernitznig <[EMAIL PROTECTED]> writes:
> The only way to make it faster after step 3 is to close that connection (and stop 
>that postmaster thread with it) and establish a new one.
> It seems like the planner (at least for pk checking) of an *established* connection 
>to a database doesn't receive the information gained 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Reply via email to