Re: Plan invalidation vs temp sequences - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Plan invalidation vs temp sequences
Date
Msg-id 14145.1192115852@sss.pgh.pa.us
Whole thread Raw
In response to Re: Plan invalidation vs temp sequences  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> Well, we *have* the sequence's Oid in the regclass constant, the problem
> is the difficulty of digging through the plan tree to find it.  I did
> consider having the planner extract it and save it aside somewhere, but
> there doesn't seem to be any very convenient place to do that, short of
> an extra traversal of the query tree, which is pretty annoying/expensive
> for data that will probably never be needed for most queries.

Actually ... now that I've consumed a bit more caffeine, it seems this
could be done relatively cheaply in setrefs.c.  We could add a
list-of-relation-OIDs to PlannedStmt, and charge setrefs.c with creating
the list, and simplify plancache.c to just use list_member_oid() instead
of groveling over the rangetable for itself.  I'll go try that out.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: full text search in 8.3
Next
From: Alexey Klyukin
Date:
Subject: Re: Some questions about mammoth replication