From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Different compression methods for FPI |
Date: | 2021-03-12 07:45:47 |
Message-ID: | 20210312074547.GQ8796@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 06, 2021 at 12:29:14PM +0500, Andrey Borodin wrote:
> > 1 марта 2021 г., в 10:03, Justin Pryzby <pryzby(at)telsasoft(dot)com> написал(а):
>
> Justin, Michael, thanks for comments!
>
> As far as I understood TODO list for the patch looks as follows:
Your patch can be simplified some, and then the only ifdef are in two short
functions. Moving the compression calls to another function/file is hardly
worth it, and anyone that implements a generic compression API could refactor
easily, if it's a win. So I don't want to impose the burden on your small
patch of setting up the compression API for everyone else's patches. Since
this is non-streaming compression, the calls are trivial.
One advantage of a generic API is that it's a good place to handle things like
compression options, like zstd:9 or zstd:3,rsyncable (I am not suggesting this
syntax).
Today, I re-sent an Dillip's patch with a change to use pkg-config for liblz4,
and it now also compiles on mac, so I used those changes to configure.ac (using
pkg-config) and src/tools/msvc/Solution.pm, and changed HAVE_LIBLZ4 to USE_LZ4.
This also resolves conflict with 32fd2b57d7f64948e649fc205c43f007762ecaac.
wal_compression_method is PGC_SIGHUP, not SUSET.
I think that the COMPRESSION_ID should have a prefix like XLOG_* - but didn't
do it here.
Does this patch need to bump XLOG_PAGE_MAGIC ?
wal_compression_options: I made this conditional compilation, so the GUC
machinery rejects methods which aren't supported. That means that xloginsert
doesn't need to check for unsupported methods. sync_method_options also uses
conditional compilation, but a GUC "check" hook would be more friendly, since
it could distinguish between "not supported" and "valid":
|ERROR: invalid value for parameter "wal_compression_method": "lz4"
--
Justin
Attachment | Content-Type | Size |
---|---|---|
0001-Use-different-compression-methods-for-FPIs.patch | text/x-diff | 20.2 KB |
0002-default-to-with-lz4.patch | text/x-diff | 2.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2021-03-12 07:51:39 | Re: OpenSSL 3.0.0 compatibility |
Previous Message | tsunakawa.takay@fujitsu.com | 2021-03-12 07:25:16 | RE: Enhance traceability of wal_level changes for backup management |