From: Gregory Stark <stark@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgreSQL.org
Cc: pgsql-jdbc@postgreSQL.org
Subject: Re: Plan invalidation vs. unnamed prepared statements
Date: Tue, 06 Mar 2007 18:04:16 +0000
Message-ID: <87fy8i9rkv.fsf@stark.xeocode.com> (raw)
In-Reply-To: <6080.1173201777@sss.pgh.pa.us>
References: <6080.1173201777@sss.pgh.pa.us>
"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> B. Don't store the unnamed statement in the plan cache. To make sure
> it's not used anymore when the plan might be stale, forcibly discard
> the unnamed statement after execution. This would get rid of a lot
> of overhead but would mean a significant change in the protocol-level
> behavior. It's hard to guess how many clients might be broken by it
> --- conceivably not any, but that seems too optimistic :-(
Can we forcibly discard it if *any* messages are received that might
invalidate a plan? So basically it would work fine unless anyone in the system
does any DDL at all? I guess that has the downside of introducing random
unpredictable failures.
Or stash the query string and replan it (possibly in the query cache this
time) if someone executes it a second time?
Can't say I like either of those options much, just trying to brainstorm.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: stark@enterprisedb.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgreSQL.org
Subject: Re: Plan invalidation vs. unnamed prepared statements
In-Reply-To: <87fy8i9rkv.fsf@stark.xeocode.com>
References: <6080.1173201777@sss.pgh.pa.us> <87fy8i9rkv.fsf@stark.xeocode.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox