From:
Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To:
Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,
Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: [PATCHES] GIN improvements
Date:
2008-11-27 20:36:41
Message-ID:
492F04D9.5070404@enterprisedb.com (view raw or flat )
Thread:
2008-05-30 10:08:05 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-06-06 13:54:20 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-06-06 14:02:23 from "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
2008-06-06 14:16:38 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-06-08 22:26:26 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-06-10 11:23:06 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-06-08 22:46:49 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-06-10 11:38:21 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-06-17 18:25:46 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-06-17 18:36:18 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-02 18:12:17 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-04 08:26:01 from "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>
2008-07-04 08:41:26 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-04 09:13:17 from Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
2008-07-07 13:45:33 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-07-07 13:58:17 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-07 14:03:40 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-07-08 18:43:20 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-08 18:51:52 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-09 18:32:37 from Neil Conway <neilc(at)samurai(dot)com>
2008-07-09 18:54:05 from Josh Berkus <josh(at)agliodbs(dot)com>
2008-07-11 21:08:55 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-11 22:58:54 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-13 21:05:16 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-22 16:03:25 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-22 17:22:32 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-22 17:50:10 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-22 18:24:40 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-22 19:01:04 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-23 13:39:49 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-23 15:05:35 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-23 16:05:36 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-23 20:08:21 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-23 20:44:30 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-07-23 21:26:49 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-24 15:53:56 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-24 17:01:35 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-24 17:20:42 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-24 18:25:15 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-24 18:29:58 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-24 19:24:11 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-07-24 20:30:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-07-25 07:48:24 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-10-31 13:27:22 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-11-27 20:36:41 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2008-11-27 22:14:59 from Gregory Stark <stark(at)enterprisedb(dot)com>
2008-11-28 00:22:35 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2008-12-02 12:56:33 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-12-02 14:11:01 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2008-12-03 01:06:05 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-12-03 06:57:52 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2008-12-03 09:40:07 from Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
2008-12-03 14:35:33 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-12-03 16:40:17 from Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
2008-12-12 17:36:55 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2008-12-22 01:56:06 from Jeff Davis <pgsql(at)j-davis(dot)com>
2009-01-16 12:39:36 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2009-01-19 07:08:25 from Jeff Davis <pgsql(at)j-davis(dot)com>
2009-01-19 16:53:22 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2009-01-20 18:01:29 from Jeff Davis <pgsql(at)j-davis(dot)com>
2009-01-20 21:04:07 from Bryce Nesbitt <bryce2(at)obviously(dot)com>
2009-01-20 21:09:51 from "Jaime Casanova" <jcasanov(at)systemguards(dot)com(dot)ec>
2009-01-20 21:54:48 from Bruce Momjian <bruce(at)momjian(dot)us>
2009-01-20 22:15:44 from Bryce Nesbitt <bryce2(at)obviously(dot)com>
2009-01-20 22:40:34 from Josh Berkus <josh(at)agliodbs(dot)com>
2009-01-20 23:37:11 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-01-20 23:40:22 from "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
2009-01-21 00:35:36 from Bryce Nesbitt <bryce2(at)obviously(dot)com>
2009-01-20 22:13:53 from Greg Smith <gsmith(at)gregsmith(dot)com>
2009-01-21 12:06:44 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2009-01-21 18:07:51 from Jeff Davis <pgsql(at)j-davis(dot)com>
2009-01-22 12:21:48 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2009-01-23 12:41:28 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2009-02-03 01:38:11 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-02-04 16:56:22 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2009-02-04 18:39:07 from Jeff Davis <pgsql(at)j-davis(dot)com>
2009-02-04 19:40:03 from Robert Haas <robertmhaas(at)gmail(dot)com>
2009-02-04 21:23:09 from Jeff Davis <pgsql(at)j-davis(dot)com>
2009-02-04 21:49:37 from Robert Haas <robertmhaas(at)gmail(dot)com>
2009-02-09 19:54:05 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-02-11 14:53:36 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2009-01-19 17:13:18 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2009-01-19 17:17:14 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
2009-01-19 17:20:19 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2009-01-19 18:00:26 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-01-19 18:15:57 from Teodor Sigaev <teodor(at)sigaev(dot)ru>
Lists:
pgsql-hackers pgsql-patches
There's a pretty fundamental issue with this patch, which is that while
buffering the inserts in the "list pages" makes the inserts fast, all
subsequent queries become slower until the tuples have been properly
inserted into the index. I'm sure it's a good tradeoff in many cases,
but there has got to be a limit to it. Currently, if you create an empty
table, and load millions of tuples into it using INSERTs, the index
degenerates into just a pile of "fast" tuples that every query needs to
grovel through. The situation will only be rectified at the next vacuum,
but if there's no deletes or updates on the table, just inserts,
autovacuum won't happen until the next anti-wraparound vacuum.
To make things worse, a query will fail if all the matching
fast-inserted tuples don't fit in the non-lossy tid bitmap. That's
another reason to limit the number of list pages; queries will start
failing otherwise.
Yet another problem is that if so much work is offloaded to autovacuum,
it can tie up autovacuum workers for a very long time. And the work can
happen on an unfortunate time, when the system is busy, and affect other
queries. There's no vacuum_delay_point()s in gininsertcleanup, so
there's no way to throttle that work.
I think we need a hard limit on the number of list pages, before we can
consider accepting this patch. After the limit is full, the next
inserter can flush the list, inserting the tuples in the list into the
tree, or just fall back to regular, slow, inserts.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
In response to
Responses
pgsql-hackers by date
Next :From: Heikki LinnakangasDate: 2008-11-27 20:37:48
Subject : Re: Visibility map, partial vacuums
Previous :From : Simon RiggsDate : 2008-11-27 19:45:34
Subject : Re: Distinct types
pgsql-patches by date
Next :From: Gregory StarkDate: 2008-11-27 22:14:59
Subject : Re: [PATCHES] GIN improvements
Previous :From : Robert HaasDate : 2008-11-27 16:38:39
Subject : Re: Fwd: [PATCHES] Auto Partitioning Patch - WIP version 1