Re: Force re-compression with lz4 - Mailing list pgsql-general

From Francisco Olarte
Subject Re: Force re-compression with lz4
Date
Msg-id CA+bJJbxPPSsuRaj1FpcNvv+-xpP8BSc7dqDd1uydcvkE-nvkOQ@mail.gmail.com
Whole thread Raw
In response to Re: Force re-compression with lz4  (Florents Tselai <florents.tselai@gmail.com>)
List pgsql-general
On Sun, 17 Oct 2021 at 21:04, Florents Tselai <florents.tselai@gmail.com> wrote:
> Yes, That COPY-delete-COPY sequence is what I ended up doing.
> Unfortunately can’t use ranges as the PK its a text string.

Unless you have a really weird PK and have trouble calculating bounds,
text strings are sortable and fine to use as ranges. If you use
half-open intervals you no not even need to query them all (i.e., do a
batch fo key<'aa', then one for >='aa', <'ab', repeat, terminate with
a >='zz' ( substitute letter pairs for whatever you think will
partition your keys in adequate chunks ) ( you can find adequate
bounds scanning the pkindex and skipping, just rememberto sue
half-open intervals and cover all the key domain ).

Francisco Olarte.



pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Force re-compression with lz4
Next
From: Florents Tselai
Date:
Subject: Re: Force re-compression with lz4