Skip site navigation (1) Skip section navigation (2)

Re: DISCARD ALL ; stored procedures

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>,PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DISCARD ALL ; stored procedures
Date: 2011-01-08 21:28:13
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Alright, so, the whole fn_extra stuff seems to be unrelated..  I'm not
sure when it's used (perhaps multiple calls to the same function in a
given query?), but the PLs have their own hash tables that they use for
storing functions that have been called.  I had assumed that was done
through fmgr, but apparently not (or at least, I can't find where..).  
I'm starting to wonder if we're trying to do too much with this
though.  If all the PLs have to go through SPI to *get* plans (at least
ones we care about), perhaps we could just use SPI to implement the
plan invalidation?

Consider if we saved the DISCARD's transaction ID and store the
last-discard txn (or whenever the function was first prepared) in the
result of the SPI prepare and then detect if we need to switch to
replanning the query in SPI_execute_plan instead of just executing it.
Of course, we'd have to have enough info *to* replan it, but we should
be able to manage that.



In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2011-01-08 21:59:11
Subject: contrib/intarray (was Re: Fixing GIN for empty/null/full-scan cases)
Previous:From: Joel JacobsonDate: 2011-01-08 21:21:53
Subject: Re: obj_unique_identifier(oid)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group