Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B54D59FB3E9 for ; Tue, 31 Oct 2006 17:20:47 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 46358-04 for ; Tue, 31 Oct 2006 21:20:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 09FBB9FB20D for ; Tue, 31 Oct 2006 17:20:42 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k9VLKYbH008941; Tue, 31 Oct 2006 16:20:34 -0500 (EST) To: Kris Jurka cc: "Strong, David" , Simon Riggs , pgsql-jdbc@postgresql.org Subject: Re: jdbc driver performance TODO In-reply-to: References: Comments: In-reply-to Kris Jurka message dated "Tue, 31 Oct 2006 14:32:05 -0500" Date: Tue, 31 Oct 2006 16:20:34 -0500 Message-ID: <8940.1162329634@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/159 X-Sequence-Number: 16042 Kris Jurka writes: > Right now it's not a big deal for the driver because plans don't change, > but for 8.3 there are plans to do prepared query invalidation when > underlying tables change. At that point we'd need to detect and refetch > metadata. I'm not sure how a client would detect this change. We haven't really talked about the semantics of this stuff, but I'm inclined to think that a prepared statement ought to go into some kind of "broken" status where it couldn't be invoked, if a change occurs that would force a change in the output column set. Otherwise you could have situations where a client does Describe Statement followed (almost) immediately by Execute and gets inconsistent results. I think we really want the auto-replan facility to handle things like addition of a new index or availability of new ANALYZE stats --- having it automatically propagate things like an ALTER COLUMN TYPE seems a good bit more questionable. regards, tom lane