From:
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To:
"Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc:
"Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>,
"Alex Hunsaker" <badalex(at)gmail(dot)com>,
PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject:
Re: Significantly larger toast tables on 8.4?
Date:
2009-01-02 18:44:48
Message-ID:
26410.1230921888@sss.pgh.pa.us (view raw or flat )
Thread:
2009-01-02 04:30:59 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-02 04:49:55 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-02 05:44:49 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-02 06:09:35 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-02 14:57:46 from "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
2009-01-02 16:01:56 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-01-02 17:44:38 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2009-01-02 18:44:48 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-01-02 19:50:34 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-03 01:30:30 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-01-03 02:27:46 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-03 09:46:30 from Simon Riggs <simon(at)2ndQuadrant(dot)com>
2009-01-02 19:42:56 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-02 20:23:13 from "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
2009-01-02 20:35:18 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2009-01-02 21:19:00 from "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
2009-01-02 21:43:40 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2009-01-03 01:36:16 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-01-03 02:37:31 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2009-01-03 03:30:31 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-01-03 04:34:11 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2009-01-03 05:17:16 from Andrew Chernow <ac(at)esilo(dot)com>
2009-01-03 06:16:58 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-03 22:56:13 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2009-01-02 22:48:15 from Martijn van Oosterhout <kleptog(at)svana(dot)org>
2009-01-07 14:44:51 from "Gregory Maxwell" <gmaxwell(at)gmail(dot)com>
2009-01-02 20:59:35 from Gregory Stark <stark(at)enterprisedb(dot)com>
2009-01-03 01:46:21 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2009-01-03 06:32:00 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-05 15:57:21 from "Merlin Moncure" <mmoncure(at)gmail(dot)com>
2009-01-03 10:46:53 from "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
2009-01-04 03:47:23 from Philip Warner <pjw(at)rhyme(dot)com(dot)au>
2009-01-04 04:29:02 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-04 04:56:57 from Philip Warner <pjw(at)rhyme(dot)com(dot)au>
2009-01-04 05:15:09 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-03 22:45:44 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2009-01-04 22:42:05 from James Mansion <james(at)mansionfamily(dot)plus(dot)com>
2009-01-05 01:34:07 from "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
2009-01-05 07:38:21 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2009-01-05 16:45:49 from Alvaro Herrera <alvherre(at)commandprompt(dot)com>
2009-01-05 16:55:03 from "Merlin Moncure" <mmoncure(at)gmail(dot)com>
2009-01-06 18:10:31 from Peter Eisentraut <peter_e(at)gmx(dot)net>
2009-01-06 19:57:41 from "Stephen R(dot) van den Berg" <srb(at)cuci(dot)nl>
2009-01-06 20:30:11 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
2009-01-02 18:56:47 from "Alex Hunsaker" <badalex(at)gmail(dot)com>
Lists:
pgsql-hackers
"Robert Haas" <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Jan 2, 2009 at 11:01 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I'm not entirely convinced by Alex' analysis anyway; the only way
>> those 39 large values explain the size difference is if they are
>> *tremendously* compressible, like almost all zeroes. The toast
>> compressor isn't so bright that it's likely to get 10X compression
>> on typical data.
> I've seen gzip approach 10X on what was basically a large
> tab-separated values file, but I agree that some more experimentation
> to determine the real cause of the problem would be useful.
If I'm counting on my fingers correctly, you'd need to assume about
23X compression to get the reported size change...
An easy way to prove or disprove the point would be to go into
src/backend/utils/adt/pg_lzcompress.c, and change the second entry
in strategy_default_data from "1024 * 1024" to "INT_MAX", then
re-load the table with the modified backend (or you could even
just do "CREATE TABLE foo AS SELECT * FROM existing_table" and
then compare sizes). If that puts the toast table size back where
it had been, then Alex correctly diagnosed the cause.
regards, tom lane
In response to
Responses
pgsql-hackers by date
Next :From: Tom LaneDate: 2009-01-02 18:47:51
Subject : Re: Documenting serializable vs snapshot isolation levels
Previous :From : Kevin GrittnerDate : 2009-01-02 18:01:55
Subject : Re: Documenting serializable vs snapshot isolationlevels