Re: Restructuring plancache.c API

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Restructuring plancache.c API
Date: 2010-11-12 21:58:12
Message-ID: 3366.1289599092@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Excerpts from Tom Lane's message of jue nov 11 19:21:34 -0300 2010:
>> I think that what we need to do is restructure the API of
>> plancache.c to make it more amenable to returning "throwaway" plans.

> I was wondering if this could help with the separation of labour of
> functions in postgres.c that we were talking about a couple of weeks
> ago.

Yeah, it was in the back of my mind that this patch might create some
merge conflicts for that one, but I figured we could deal with that when
the time came. I wasn't intending to refactor the behavior of
pg_analyze_and_rewrite or pg_plan_queries, just change where they might
get called from, so I think any conflict will be inessential and easily
resolved.

> The main impedance mismatch, so to speak, is that those functions
> aren't at all related to caching of any sort; but then, since you're
> looking for a new name for the source file, I return to my earlier
> suggestion of a generic "queries.c" or some such, which could handle all
> these issues. (Of course, querycache.c doesn't make any sense.)

I thought about querycache.c too, but it seems to carry the wrong
connotations --- in mysql-land I believe they use that term to imply
caching a query's *results*. But queries.c seems so generic as to
convey no information at all.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2010-11-12 22:09:39 8.4-vintage problem in postmaster.c
Previous Message Alvaro Herrera 2010-11-12 21:52:39 Re: WIP: extensible enums