Re: Common Table Expressions (WITH RECURSIVE) patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Stark" <stark(at)enterprisedb(dot)com>
Cc: "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>, "Dimitri Fontaine" <dfontaine(at)hi-media(dot)com>, "Jeff Davis" <pgsql(at)j-davis(dot)com>, "Tatsuo Ishii" <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Common Table Expressions (WITH RECURSIVE) patch
Date: 2008-10-01 14:11:09
Message-ID: 9067.1222870269@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Greg Stark" <stark(at)enterprisedb(dot)com> writes:
> On Wed, Oct 1, 2008 at 2:54 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> So it seems like the appropriate generalization is to have an array of
>> read positions inside the tuplestore and allow callers to say "read
>> using position N", plus some API to allow positions to be allocated to
>> different requestors.

> One other reason the tuplestore should know the position of all the
> readers is that ideally it would want to be able to discard any tuples
> older than the oldest read position. That also means it needs to know
> when all the call sites have allocated their position and don't need
> to reset it.

Good point. So we'd need per-position capability flags, not
per-tuplestore.

I hadn't realized that this would be relevant to window functions.
Now that I know that, I propose fixing tuplestore for multiple
positions and committing it separately, before I go back to the CTE
patch. Then Hitoshi-san will have something he can work with too.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-10-01 14:27:52 Re: Block-level CRC checks
Previous Message Brian Hurt 2008-10-01 14:05:33 Re: Block-level CRC checks