pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jerry Sievers <jerry@jerrysievers.com>
To: pgsql-admin@postgresql.org
Subject: Dropping of indexes with cached PL query plans
Date: 16 Feb 2006 10:36:01 -0500
Message-ID: <m3ek239uzi.fsf@prod01.jerrysievers.com> (raw)

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/



view thread (3+ messages)  latest in thread

Message-ID: <m3ek239uzi.fsf@prod01.jerrysievers.com>
Permalink:  ../m3ek239uzi.fsf@prod01.jerrysievers.com/
Also on:    postgresql.org/message-id/m3ek239uzi.fsf@prod01.jerrysievers.com

 · 

reply

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-admin@postgresql.org
  Cc: jerry@jerrysievers.com
  Subject: Re: Dropping of indexes with cached PL query plans
  In-Reply-To: <m3ek239uzi.fsf@prod01.jerrysievers.com>
  References: <m3ek239uzi.fsf@prod01.jerrysievers.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