From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Jacob Champion <jchampion(at)timescale(dot)com>, Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
Subject: | Re: [PATCH] Compression dictionaries for JSONB |
Date: | 2022-06-28 12:37:14 |
Message-ID: | CAJ7c6TOkpCBFV_GHUfcf5q-aBw9EpkAfDdbhMorLs3QA=OwW5g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Simon,
Many thanks for your feedback!
I'm going to submit an updated version of the patch in a bit. I just
wanted to reply to some of your questions / comments.
> Dictionaries have no versioning. [...]
> Does the order of entries in the dictionary allow us to express a priority? i.e. to allow Huffman coding. [...]
This is something we discussed in the RFC thread. I got an impression
that the consensus was reached:
1. To simply use 32-bit codes in the compressed documents, instead of
16-bit ones as it was done in ZSON;
2. Not to use any sort of variable-length coding;
3. Not to use dictionary versions. New codes can be added to the
existing dictionaries by executing ALTER TYPE mydict ADD ENTRY. (This
also may answer your comment regarding a limit on SQL statement size.)
4. The compression scheme can be altered in the future if needed.
Every compressed document stores algorithm_version (1 byte).
Does this plan of action sound OK to you? At this point it is not too
difficult to make design changes.
--
Best regards,
Aleksander Alekseev
From | Date | Subject | |
---|---|---|---|
Next Message | Isaac Morland | 2022-06-28 13:00:05 | Re: Separate the attribute physical order from logical order |
Previous Message | Marcos Pegoraro | 2022-06-28 12:19:36 | better error description on logical replication |