supabase / postgres

Unmodified Postgres with some useful plugins

Home Page:https://supabase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile Postgres w/`--with-lz4` for better column compression

mqp opened this issue · comments

It seems that Postgres 14+ supports a substantially more efficient compression mode for oversized column values, LZ4, which you can opt into on a per-column basis. You can read about the introduction of the compression option here. Here are some benchmarks someone did to illustrate the difference.

To use this, Postgres needs to be compiled with the --with-lz4 flag, so it would be nice to enable that.

I care about this because I am migrating from Firestore, and stuffing a lot of my data during the migration process into big JSONB columns, which always go to TOAST and get compressed. So this is a big deal to me.

I think it's easy and safe enough to add. Only to ensure liblz4-dev is installed on a linux image and add --with-lz4 to build scripts.

Hi @mqp,

This has rolled out to the Supabase platform today, available for newly created projects, or ones which are paused and then unpaused (to get re-provisioned using the updated server image). Paid projects will require a support ticket so we can run that operation on your behalf.