Re: Delaying the planning of unnamed statements until Bind - Mailing list pgsql-hackers

From Oliver Jowett
Subject Re: Delaying the planning of unnamed statements until Bind
Date
Msg-id 40BA63F7.80001@opencloud.com
Whole thread Raw
In response to Re: Delaying the planning of unnamed statements until Bind  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
Heikki Linnakangas wrote:

> I'm worried about plan stability if we enable it by default. It could
> lead to nasty, hard to reproduce performance problems. Think about this
> scenario:

This is my main concern with the approach Tom suggested.

> Also keep in mind that at least some application servers have a
> client-side prepared statement cache, so that even if the application
> used a non-prepared statement for the reports, the middleware prepares it
> anyway.

It's less of an issue if we only use this behaviour when binding the 
unnamed statement. The unnamed statement is quite "special" and is 
unlikely to be reused accidentally (for one thing, you can only have one 
unnamed statement..)

The patch I posted to -patches earlier uses this approach.

-O


pgsql-hackers by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: v3 protocol & string encoding
Next
From: Oleg Bartunov
Date:
Subject: Re: yet another contrib module