Re: Compressed TOAST Slicing
Paul Ramsey <pramsey@cleverelephant.ca>
From: Paul Ramsey <pramsey@cleverelephant.ca>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>,
Michael Paquier <michael@paquier.xyz>,
Andres Freund <andres@anarazel.de>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Regina Obe <r@pcorp.us>
Date: 2019-03-13T18:42:33Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add support for partial TOAST decompression
- 4d0e994eed83 12.0 landed
-
Remove remaining hard-wired OID references in the initial catalog data.
- 3aa0395d4ed3 12.0 cited
-
Rephrase references to "time qualification".
- ebcc7bf949ba 12.0 cited
Attachments
- compressed-datum-slicing-20190313b.patch (application/octet-stream) patch
> On Mar 13, 2019, at 9:32 AM, Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>
>
>
>> 13 марта 2019 г., в 21:05, Paul Ramsey <pramsey@cleverelephant.ca> написал(а):
>>
>> Here is a new (final?) patch ...
>>
>> <compressed-datum-slicing-20190313a.patch>
>
> This check
>
> @@ -744,6 +748,8 @@ pglz_decompress(const char *source, int32 slen, char *dest,
> {
> *dp = dp[-off];
> dp++;
> + if (dp >= destend) /* check for buffer overrun */
> + break; /* do not clobber memory */
> }
>
> is still done for every byte. You can precompute maximum allowed length before that cycle. Here's diff
Thanks! Attached change,
P