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>, "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-03 19:55:56
Message-ID:
3794.1223063756@sss.pgh.pa.us (view raw or flat )
Thread:
2008-09-08 15:12:23 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-08 17:08:55 from Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
2008-09-08 20:11:27 from Jeff Davis <jdavis(at)truviso(dot)com>
2008-09-08 21:53:20 from Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
2008-09-08 22:13:41 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-08 20:13:34 from Gregory Stark <stark(at)enterprisedb(dot)com>
2008-09-08 20:25:18 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-09 04:45:55 from Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
2008-09-09 05:01:12 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-09 06:23:05 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-09 13:47:46 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-09 15:21:33 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-10 18:27:57 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-09 14:40:14 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-09 14:45:55 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-09 14:59:48 from Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
2008-09-09 16:06:53 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-09 16:27:17 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-09 16:51:55 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-09 17:25:29 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-09 17:32:31 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-09 20:07:22 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-09 15:01:10 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-09 04:49:00 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-09 15:12:58 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-15 09:46:16 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-16 05:41:14 from David Fetter <david(at)fetter(dot)org>
2008-09-16 16:41:19 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-16 19:43:00 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-16 22:23:38 from Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
2008-09-16 22:40:00 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-16 18:32:23 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-17 03:14:31 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-17 04:48:29 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-17 10:29:04 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-17 12:12:09 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-17 12:25:44 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-17 14:13:33 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2008-09-17 14:47:01 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-17 14:59:13 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-17 15:05:13 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-18 03:55:25 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-23 12:55:41 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-23 13:16:02 from Gregory Stark <stark(at)enterprisedb(dot)com>
2008-09-23 13:40:39 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-24 01:45:24 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-24 06:36:56 from Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
2008-09-30 18:03:14 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-30 19:39:10 from Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
2008-10-01 00:59:37 from "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
2008-10-01 13:54:36 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-01 14:03:37 from "Greg Stark" <stark(at)enterprisedb(dot)com>
2008-10-01 14:11:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-01 16:05:57 from "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
2008-10-01 19:53:11 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-02 01:16:47 from "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
2008-10-02 04:44:45 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-02 09:02:35 from Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
2008-10-02 12:13:44 from "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
2008-10-03 19:55:56 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-04 15:33:21 from David Fetter <david(at)fetter(dot)org>
2008-10-05 15:41:21 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-01 03:10:51 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-24 05:24:33 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-19 01:32:51 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-19 02:52:31 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-21 02:42:42 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-21 02:52:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Lists:
pgsql-hackers
I've successfully taught the WITH patch to do single evaluation of WITH
queries. I've also been through all of the planner and executor code
for it and am now feeling pretty happy with the whole thing. There are
still a small number of loose ends (see XXX in the patch), but I don't
believe any of them represent significant work --- I just left them
undone because they weren't in the way of testing anything else.
One point of interest (at least to Hitoshi-san) is that my first cut
at the multiple-readout tuplestore turned out to be not quite the right
thing. In the original code, if the read pointer was "at eof" (meaning
the previous gettuple call had returned null), then a puttuple call
would move the read pointer forward over the added tuple, keeping it
"at eof". This was done because nodeMaterial.c wanted it and no other
callers cared particularly. I had generalized that to the idea that
*all* read pointers that are "at eof" should get moved; but this turns
out to be a really bad idea, at least for nodeCtescan's usage. What
seems to be the right thing is for only the "active" read pointer to
be moved forward, with inactive ones dropping out of "at eof" state.
This seems reasonable because the point is to not have to reprocess
a tuple you know you just stuck into the tuplestore --- but the other
readers of the tuplestore won't know that, and need to see the tuple
you added. But it might be that we need to make the behavior
configurable somehow, if the window-functions patch turns out to
need something different.
Barring surprises in the loose ends, I expect to be able to commit
this in a couple of days.
regards, tom lane
In response to
Responses
pgsql-hackers by date
Next :From: Robert HaasDate: 2008-10-04 01:39:37
Subject : Re: patch: Add columns via CREATE OR REPLACE VIEW
Previous :From : Alvaro HerreraDate : 2008-10-03 16:56:58
Subject : Re: parallel restore test results