From:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To:
"Kevin Grittner" <kgrittn(at)mail(dot)com>
Cc:
"Marko Tiikkaja" <pgmail(at)joh(dot)to>,
"Pgsql Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: Materialized views WIP patch
Date:
2013-01-16 18:38:57
Message-ID:
29211.1358361537@sss.pgh.pa.us (view raw or flat )
Thread:
2013-01-16 16:48:17 from "Kevin Grittner" <kgrittn(at)mail(dot)com>
2013-01-16 18:38:57 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-01-16 19:12:07 from Josh Berkus <josh(at)agliodbs(dot)com>
2013-01-17 12:54:55 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-01-24 18:07:54 from Noah Misch <noah(at)leadboat(dot)com>
2013-02-16 01:01:10 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-16 01:24:16 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-02-16 01:57:25 from Bruce Momjian <bruce(at)momjian(dot)us>
2013-02-16 18:00:34 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-16 17:53:14 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-16 19:46:45 from Noah Misch <noah(at)leadboat(dot)com>
2013-02-17 15:13:27 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-18 13:02:10 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-02-18 14:49:14 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-18 20:28:43 from Noah Misch <noah(at)leadboat(dot)com>
2013-02-18 21:48:05 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-19 13:54:34 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-02-19 14:24:28 from Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
2013-02-19 16:01:36 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2013-02-20 11:13:49 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-02-20 11:43:42 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-02-20 16:58:15 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2013-02-17 20:23:57 from Thom Brown <thom(at)linux(dot)com>
2013-02-18 15:18:34 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-19 22:09:13 from "Erik Rijkers" <er(at)xs4all(dot)nl>
2013-02-19 22:18:24 from Josh Berkus <josh(at)agliodbs(dot)com>
2013-02-19 22:38:24 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-19 22:45:10 from Josh Berkus <josh(at)agliodbs(dot)com>
2013-02-19 23:32:51 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-19 23:41:16 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-20 00:07:08 from Josh Berkus <josh(at)agliodbs(dot)com>
2013-02-19 22:22:26 from David Fetter <david(at)fetter(dot)org>
2013-02-20 14:29:45 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2013-02-20 15:28:25 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-20 17:14:48 from "Erik Rijkers" <er(at)xs4all(dot)nl>
2013-02-25 22:07:27 from "Erik Rijkers" <er(at)xs4all(dot)nl>
2013-02-19 22:30:52 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-19 22:47:24 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-20 08:11:18 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-02-20 15:24:14 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-20 16:20:41 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-02-20 16:26:10 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-20 17:59:59 from Greg Stark <stark(at)mit(dot)edu>
2013-02-20 18:28:23 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-20 18:33:20 from Josh Berkus <josh(at)agliodbs(dot)com>
2013-02-21 00:45:01 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2013-02-20 18:57:36 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2013-02-20 19:30:05 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-20 19:35:35 from Stephen Frost <sfrost(at)snowman(dot)net>
2013-02-20 21:25:50 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2013-02-20 22:03:36 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 13:20:11 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2013-02-21 15:02:53 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 04:14:09 from Greg Stark <stark(at)mit(dot)edu>
2013-02-21 08:31:17 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-02-21 14:38:57 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 15:01:15 from Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
2013-02-21 15:18:42 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 15:10:15 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-02-21 15:26:06 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 15:42:00 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-02-21 22:11:10 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 23:32:08 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-02-22 08:10:12 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-02-23 01:00:02 from Josh Berkus <josh(at)agliodbs(dot)com>
2013-02-23 12:55:29 from Greg Stark <stark(at)mit(dot)edu>
2013-02-23 13:00:14 from Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
2013-02-28 14:55:18 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-02-28 16:00:17 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-02-28 16:54:38 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-02-28 16:08:50 from Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
2013-02-28 17:52:58 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-01 13:56:42 from Ants Aasma <ants(at)cybertec(dot)at>
2013-03-01 14:18:33 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-01 15:01:27 from Ants Aasma <ants(at)cybertec(dot)at>
2013-03-02 14:36:28 from Greg Stark <stark(at)mit(dot)edu>
2013-03-02 15:06:18 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-03 08:48:03 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-03-03 13:12:12 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-03 17:06:36 from Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
2013-03-03 20:13:31 from Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
2013-03-03 21:06:56 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-03 23:01:18 from Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
2013-03-03 23:39:08 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-03-04 00:27:02 from Josh Berkus <josh(at)agliodbs(dot)com>
2013-03-04 04:04:07 from Craig Ringer <craig(at)2ndquadrant(dot)com>
2013-03-04 13:37:32 from Euler Taveira <euler(at)timbira(dot)com>
2013-03-05 08:50:39 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2013-03-05 12:15:55 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-05 14:44:38 from Simon Riggs <simon(at)2ndquadrant(dot)com>
2013-03-05 20:03:56 from Josh Berkus <josh(at)agliodbs(dot)com>
2013-03-05 21:09:08 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-05 22:37:41 from Josh Berkus <josh(at)agliodbs(dot)com>
2013-03-05 21:08:05 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-03-05 21:51:52 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-05 22:04:13 from Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
2013-03-05 22:15:03 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-07 23:28:05 from Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
2013-03-05 21:58:44 from Nicolas Barbier <nicolas(dot)barbier(at)gmail(dot)com>
2013-03-05 22:02:46 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-03-06 08:28:10 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2013-03-06 14:16:59 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2013-03-07 08:55:04 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2013-03-08 14:11:55 from Bruce Momjian <bruce(at)momjian(dot)us>
2013-03-06 16:13:05 from Greg Stark <stark(at)mit(dot)edu>
2013-03-08 14:45:59 from Bruce Momjian <bruce(at)momjian(dot)us>
2013-03-03 14:33:08 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-04 00:34:44 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-04 00:57:41 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-04 15:39:37 from Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
2013-03-06 04:00:31 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2013-03-06 14:53:20 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-06 21:51:20 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-06 22:28:29 from "David E(dot) Wheeler" <david(at)justatheory(dot)com>
2013-03-07 15:55:29 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-03-07 17:14:57 from "David E(dot) Wheeler" <david(at)justatheory(dot)com>
2013-03-08 15:31:30 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-03-06 22:45:22 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2013-03-03 22:47:50 from Greg Stark <stark(at)mit(dot)edu>
2013-02-21 22:16:46 from Greg Stark <stark(at)mit(dot)edu>
2013-02-21 22:46:40 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 08:54:06 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-02-21 15:10:09 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 15:19:57 from Andres Freund <andres(at)2ndquadrant(dot)com>
2013-02-21 15:35:58 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 13:05:29 from Robert Haas <robertmhaas(at)gmail(dot)com>
2013-02-21 13:22:16 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2013-02-21 14:25:50 from Kevin Grittner <kgrittn(at)ymail(dot)com>
2013-02-21 21:48:07 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2013-02-21 14:47:33 from Kevin Grittner <kgrittn(at)ymail(dot)com>
Lists:
pgsql-committers pgsql-hackers
"Kevin Grittner" <kgrittn(at)mail(dot)com> writes:
> Tom Lane wrote:
>> Surely that should fall out automatically given that the
>> dependency is properly expressed in pg_depend?
> The *definitions* sort properly, but what I'm trying to do is
> define them WITH NO DATA and load data after all the COPY
> statements for tables. If mva is referenced by mvb, the goal is the
> REFRESH mva, build its indexes before running REFRESH for mvb and
> building its indexes. To do things in any other order does't seem
> to me to leave things after restore in the same state they were in
> at the time of the dump.
Ah. Can't you treat this using the same pg_dump infrastructure as
for the data for an ordinary table? The dependencies made for the
TableDataInfo object might be a bit different, but after that it
seems like the sort logic ought to be happy.
> Where I really need someone to hit me upside the head with a
> clue-stick is the code I added to the bottom of RelationBuildDesc()
> in relcache.c. The idea is that on first access to an unlogged MV,
> to detect that the heap has been replaced by the init fork, set
> relisvalid to false, and make the heap look normal again.
Hmm. I agree that relcache.c has absolutely no business doing that,
but not sure what else to do instead. Seems like it might be better
done at first touch of the MV in the parser, rewriter, or planner ---
but the fact that I can't immediately decide which of those is right
makes me feel that it's still too squishy.
I'm also wondering about locking issues there. Obviously you don't
want more than one backend trying to rebuild the MV.
Do we really need unlogged MVs in the first iteration? Seems like
that's adding a whole bunch of new issues, when you have quite enough
already without that.
regards, tom lane
In response to
Responses
pgsql-hackers by date
Next :From: Josh BerkusDate: 2013-01-16 19:12:07
Subject : Re: Materialized views WIP patch
Previous :From : Josh BerkusDate : 2013-01-16 18:00:22
Subject : Re: CF3+CF4 WAS: Parallel query execution
pgsql-committers by date
Next :From: Josh BerkusDate: 2013-01-16 19:12:07
Subject : Re: Materialized views WIP patch
Previous :From : Kevin GrittnerDate : 2013-01-16 16:48:17
Subject : Re: Materialized views WIP patch