X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id A62879DCABF for ; Thu, 16 Feb 2006 11:35:59 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18454-07 for ; Thu, 16 Feb 2006 11:36:03 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from prod01.jerrysievers.com (adsl-64-118-249-70.netrox.net [64.118.249.70]) by postgresql.org (Postfix) with ESMTP id B72F09DCA25 for ; Thu, 16 Feb 2006 11:35:56 -0400 (AST) Received: (from gsievers@localhost) by prod01.jerrysievers.com (8.11.0/8.11.0) id k1GFa1B06462; Thu, 16 Feb 2006 10:36:01 -0500 To: pgsql-admin@postgresql.org Subject: Dropping of indexes with cached PL query plans From: Jerry Sievers Date: 16 Feb 2006 10:36:01 -0500 Message-ID: Lines: 35 X-Mailer: Gnus v5.7/Emacs 20.7 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.068 required=5 tests=[AWL=0.068] X-Spam-Score: 0.068 X-Spam-Level: X-Archive-Number: 200602/195 X-Sequence-Number: 20616 Hello. I am curious what (if any) reliable solution/workaround there is in cases where objects that are a part of a currently cached query plan disappear unexpectedly. Using JDBC and pooled connections, our production system has at any time 120 or so live connections, most in an idle state. They must remain alive however for proper operation of the app server. Any of these connections that may have previously executed PL functions which planned an index lookup are now going to fault if same index goes away. Had wondered if a postmaster 'reload' would elicit a recompiling of func query plans (did *not* see this in the docs but was hopeful...). Anyway, we find that reloading the function definitions allows continued proper operation. Of course, due to quite a lot of indirection in func and trigger invocation, identifying just the right funcs to reload seems unfeasible. We don't relish the thought of reloading all 400+ of them after an index drop. For that matter, I am averse to reloading *any* func defs on a live prod machine either as matter of principle. Arg! But the nature of business at this company makes difficult a strict adherance to "hands off prod boxes" methodology. Comments? -- ------------------------------------------------------------------------------- Jerry Sievers 305 854-3001 (home) WWW ECommerce Consultant 305 321-1144 (mobile http://www.JerrySievers.com/