From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Rahila Syed <rahilasyed(dot)90(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [REVIEW] Re: Compression of full-page-writes |
Date: | 2014-12-05 07:42:08 |
Message-ID: | CAHGQGwF-NLX-iNvqX0SCyo7uhasSMAihez3sLtEY1ykoeOdaXQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 4, 2014 at 8:37 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Thu, Dec 4, 2014 at 7:36 PM, Rahila Syed <rahilasyed(dot)90(at)gmail(dot)com> wrote:
>> IIUC, forcibly written fpws are not exposed to user , so is it worthwhile to
>> add a GUC similar to full_page_writes in order to control a feature which is
>> unexposed to user in first place?
>>
>> If full page writes is set 'off' by user, user probably cannot afford the
>> overhead involved in writing large pages to disk . So , if a full page write
>> is forcibly written in such a situation it is better to compress it before
>> writing to alleviate the drawbacks of writing full_page_writes in servers
>> with heavy write load.
>>
>> The only scenario in which a user would not want to compress forcibly
>> written pages is when CPU utilization is high. But according to measurements
>> done earlier the CPU utilization of compress='on' and 'off' are not
>> significantly different.
>
> Yes they are not visible to the user still they exist. I'd prefer that we have
> a safety net though to prevent any problems that may occur if compression
> algorithm has a bug as if we enforce compression for forcibly-written blocks
> all the backups of our users would be impacted.
>
> I pondered something that Andres mentioned upthread: we may not do the
> compression in WAL record only for blocks, but also at record level. Hence
> joining the two ideas together I think that we should definitely have
> a different
> GUC to control the feature, consistently for all the images. Let's call it
> wal_compression, with the following possible values:
> - on, meaning that a maximum of compression is done, for this feature
> basically full_page_writes = on.
> - full_page_writes, meaning that full page writes are compressed
> - off, default value, to disable completely the feature.
> This would let room for another mode: 'record', to completely compress
> a record. For now though, I think that a simple on/off switch would be
> fine for this patch. Let's keep things simple.
+1
Regards,
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2014-12-05 07:44:01 | Re: [REVIEW] Re: Compression of full-page-writes |
Previous Message | Amit Kapila | 2014-12-05 07:18:22 | Re: On partitioning |