Skip to content

Commit

Permalink
Set default compression as the superior lz4 algorithm.
Browse files Browse the repository at this point in the history
This one is faster and achieves better compression than pglz,
but is only available in PostgreSQL starting in version 14
(which isn't a concern for us since we'll be using latest stable
to start with.)
  • Loading branch information
emmiegit committed Jan 14, 2024
1 parent aa1de91 commit debb1e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deepwell/migrations/20220906103252_deepwell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ CREATE TYPE page_revision_change AS ENUM (
-- but since we can't we'll just verify the hash length.
CREATE TABLE text (
hash BYTEA PRIMARY KEY,
contents TEXT COMPRESSION pglz NOT NULL,
contents TEXT NOT NULL,

CHECK (length(hash) = 16) -- KangarooTwelve hash size, 128 bits
);
Expand Down
1 change: 1 addition & 0 deletions install/files/postgres/init/02-seed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET default_toast_compression=lz4;
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
Expand Down

0 comments on commit debb1e6

Please sign in to comment.