Re: [REVIEW] Re: Compression of full-page-writes

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Rahila Syed <rahilasyed(dot)90(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [REVIEW] Re: Compression of full-page-writes
Date: 2014-12-05 07:44:01
Message-ID: CAB7nPqRgjKg3=9XWk4nxgXuMeQ4s9aFQO+0Dg5LQqQ698eBJuQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 5, 2014 at 10:53 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Thu, Dec 4, 2014 at 5:36 AM, Rahila Syed <rahilasyed(dot)90(at)gmail(dot)com>
> wrote:
> > The only scenario in which a user would not want to compress forcibly
> > written pages is when CPU utilization is high.
>
> Or if they think the code to compress full pages is buggy.
>
Yeah, especially if in the future we begin to add support for other
compression algorithm.

> > But according to measurements
> > done earlier the CPU utilization of compress='on' and 'off' are not
> > significantly different.
>
> If that's really true, we could consider having no configuration any
> time, and just compressing always. But I'm skeptical that it's
> actually true.
>
So am I. Data is the thing that matters for us.

Speaking of which, I have been working more on the set of patches to add
support for this feature and attached are updated patches, with the
following changes:
- Addition of a new GUC parameter wal_compression, being a complete switch
to control compression of WAL. Default is off. We could extend this
parameter later if we decide to add support for new algorithms or new
modes, let's say a record-level compression. Parameter is PGC_POSTMASTER.
We could make it PGC_SIGHUP but that would be better as a future
optimization, and would need a new WAL record type similar to
full_page_writes. (Actually, I see no urgency in making it SIGHUP..)
- full_page_writes is moved back to its original state
- Correction of a couple of typos and comments.
Regards,
--
Michael

Attachment Content-Type Size
0001-Move-pg_lzcompress.c-to-src-common.patch application/x-patch 52.2 KB
0002-Support-compression-for-full-page-writes-in-WAL.patch application/x-patch 22.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-12-05 08:10:02 Re: On partitioning
Previous Message Fujii Masao 2014-12-05 07:42:08 Re: [REVIEW] Re: Compression of full-page-writes