Re: RFC: compression dictionaries for JSONB

2022-04-22 Thread Aleksander Alekseev
Hi hackers, Many thanks for all your great feedback! Please see the follow-up thread '[PATCH] Compression dictionaries for JSONB': https://postgr.es/m/CAJ7c6TOtAB0z1UrksvGTStNE-herK-43bj22%3D5xVBg7S4vr5rQ%40mail.gmail.com -- Best regards, Aleksander Alekseev

Re: RFC: compression dictionaries for JSONB

2021-10-13 Thread Matthias van de Meent
On Wed, 13 Oct 2021 at 11:48, Aleksander Alekseev wrote: > > Hi Matthias, > > > Assuming this above is option 1. If I understand correctly, this > > option was 'adapt the data type so that it understands how to handle a > > shared dictionary, decreasing storage requirements'. > > [...] > > Assumin

Re: RFC: compression dictionaries for JSONB

2021-10-13 Thread Aleksander Alekseev
Hi Matthias, > Assuming this above is option 1. If I understand correctly, this > option was 'adapt the data type so that it understands how to handle a > shared dictionary, decreasing storage requirements'. > [...] > Assuming this was the 2nd option. If I understand correctly, this > option is ef

Re: RFC: compression dictionaries for JSONB

2021-10-11 Thread Matthias van de Meent
On Mon, 11 Oct 2021 at 15:25, Aleksander Alekseev wrote: > Agree, add / change / remove of a column should be handled > automatically. Just to clarify, by column option do you mean syntax > like ALTER TABLE ... ALTER COLUMN ... etc, right? Correct, either SET (option) or maybe using typmod (which

Re: RFC: compression dictionaries for JSONB

2021-10-11 Thread Aleksander Alekseev
Matthias, Alvaro, Many thanks for your comments and suggestions! > Well, I for one would like access to manually add entries to the > dictionary. What I'm not interested in is being required to manually > update the dictionary; but the ability to manually insert into the > dictionary however is m

Re: RFC: compression dictionaries for JSONB

2021-10-09 Thread Matthias van de Meent
On Fri, 8 Oct 2021 at 21:21, Alvaro Herrera wrote: > > On 2021-Oct-08, Matthias van de Meent wrote: > > > That's a good point, but if we're extending this syntax to allow the > > ability of including other types, then I'd instead extend the syntax > > that of below, so that the type of the diction

Re: RFC: compression dictionaries for JSONB

2021-10-08 Thread Alvaro Herrera
On 2021-Oct-08, Matthias van de Meent wrote: > That's a good point, but if we're extending this syntax to allow the > ability of including other types, then I'd instead extend the syntax > that of below, so that the type of the dictionary entries is required > in the syntax: > > CREATE TYPE name

Re: RFC: compression dictionaries for JSONB

2021-10-08 Thread Matthias van de Meent
On Fri, 8 Oct 2021 at 17:19, Alvaro Herrera wrote: > > On 2021-Oct-08, Matthias van de Meent wrote: > > > On Fri, 8 Oct 2021 at 11:47, Aleksander Alekseev > > wrote: > > > > In order to do this, the SQL syntax should be modified. The proposed > > > syntax is based on Matthias van de Meent's idea

Re: RFC: compression dictionaries for JSONB

2021-10-08 Thread Alvaro Herrera
On 2021-Oct-08, Matthias van de Meent wrote: > On Fri, 8 Oct 2021 at 11:47, Aleksander Alekseev > wrote: > > In order to do this, the SQL syntax should be modified. The proposed > > syntax is based on Matthias van de Meent's idea [6]: > > Seems fine > > > ``` > > CREATE TYPE AS JSONB_DICTIONA

Re: RFC: compression dictionaries for JSONB

2021-10-08 Thread Matthias van de Meent
On Fri, 8 Oct 2021 at 11:47, Aleksander Alekseev wrote: > This is a follow-up thread to `Add ZSON extension to /contrib/` [1]. > The ZSON extension introduces a new type called ZSON, which is 100% > compatible with JSONB but uses a shared dictionary of strings most > frequently used by given JSONB

RFC: compression dictionaries for JSONB

2021-10-08 Thread Aleksander Alekseev
Hi hackers, == Background == This is a follow-up thread to `Add ZSON extension to /contrib/` [1]. The ZSON extension introduces a new type called ZSON, which is 100% compatible with JSONB but uses a shared dictionary of strings most frequently used by given JSONB documents for compression. See th