Skip site navigation (1) Skip section navigation (2)

Re: Higher TOAST compression.

From: Laurent Laborde <kerdezixe(at)gmail(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Higher TOAST compression.
Date: 2009-07-22 08:54:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
My 1st applied patch is the safest and simpliest :
in pg_lzcompress.c :

static const PGLZ_Strategy strategy_default_data = {
        256,    /* Data chunks less than 256 are not compressed */
        256,    /* force compression on data chunks on record >= 256bytes */
        1,      /* compression rate below 1% fall back to uncompressed    */
        256,    /* Stop history lookup if a match of 256 bytes is found   */
        6       /* lower good match size b 6% at every lookup iteration   */
const PGLZ_Strategy *const PGLZ_strategy_default = &strategy_default_data;

I need to test for a few days. But the firsts tests show that we're
still IObound :)
The most obvious effect is reduction by a factor 2~10 of the size of
some TOAST table.
It seems that a lot of record are now kept in-line instead of being
stored in TOAST.

I will come back later with some numbers :)

Next patch will be a modified kevin's patch. (it doesn't directly
apply to our source code as i'm using postgresql 8.3 and his patch is
for 8.4) and a change in TOAST thresold and target.

What do you think about the parameters i used in the compression strategy ?
PS : biggest records are french text and html. (blog data : articles,
comments, ...)
Thank you.

Laurent Laborde
Sysadmin @

In response to


pgsql-hackers by date

Next:From: Magnus HaganderDate: 2009-07-22 09:03:04
Subject: Re: [PATCH] user mapping extension to pg_ident.conf
Previous:From: KaiGai KoheiDate: 2009-07-22 08:30:55
Subject: Re: [PATCH] SE-PgSQL/tiny rev.2193

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group