Re: - Proposal for repreparing prepared statements - Mailing list pgsql-hackers

From Tom Lane
Subject Re: - Proposal for repreparing prepared statements
Date
Msg-id 14861.1158170858@sss.pgh.pa.us
Whole thread Raw
In response to - Proposal for repreparing prepared statements  (Stephen Marshall <smarshall@wsi.com>)
List pgsql-hackers
Stephen Marshall <smarshall@wsi.com> writes:
> The following is a proposal for work I'd like to do to force 
> long-running backend processes to reprepare their prepared statements.  
> It would be used in cases where the user knows they have made a database 
> change that will invalidate an existing prepared statement. 

There should be no need for users to concern themselves with this.  The
direction we've been intending to go in is to automatically invalidate
stored plans when any related schema or statistics change occurs,
forcing a re-plan on any subsequent use.  See past discussions (IIRC,
Neil Conway actually did some work on this idea earlier this year, but
didn't get it done).

The appropriate cross-backend communication mechanism already exists:
it's the catcache/relcache invalidation code.  No need to fool with
finding a spare signal; and you can't do any meaningful work in a signal
handler anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Chris Browne
Date:
Subject: Re: AIX shared libraries
Next
From: Tom Dunstan
Date:
Subject: Re: Getting a move on for 8.2 beta