Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Dockerfile-multigres
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,11 @@ RUN sed -i 's/ timescaledb,//g; s/ plv8,//g; s/ postgis,//g; s/ pgrouting,//g' \
/etc/postgresql-custom/supautils.conf

# Add orioledb to shared_preload_libraries and configure as default table access method
# Rewind: 1200s window, 100k transactions, 1280 x 8KB = 10MB buffer
# orioledb-17 is pinned to 17.11+, which added output_plugin_libraries
# as an allow-list for logical decoding output plugins.
RUN sed -i "s/\(shared_preload_libraries.*\)'/\1, orioledb'/" /etc/postgresql/postgresql.conf && \
echo "default_table_access_method = 'orioledb'" >> /etc/postgresql/postgresql.conf && \
echo "orioledb.enable_rewind = true" >> /etc/postgresql/postgresql.conf && \
echo "orioledb.rewind_max_time = 1200" >> /etc/postgresql/postgresql.conf && \
echo "orioledb.rewind_max_transactions = 100000" >> /etc/postgresql/postgresql.conf && \
echo "orioledb.rewind_buffers = 1280" >> /etc/postgresql/postgresql.conf
echo "output_plugin_libraries = 'pgoutput, test_decoding, wal2json'" >> /etc/postgresql/postgresql.conf

# Register orioledb before initdb migrations run
RUN echo "CREATE EXTENSION orioledb;" > /docker-entrypoint-initdb.d/init-scripts/00-pre-init.sql && \
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile-orioledb-17
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ RUN sed -i 's/ timescaledb,//g;' "/etc/postgresql/postgresql.conf" && \
RUN sed -i 's/\(shared_preload_libraries.*\)'\''\(.*\)$/\1, orioledb'\''\2/' "/etc/postgresql/postgresql.conf" && \
echo "default_table_access_method = 'orioledb'" >> "/etc/postgresql/postgresql.conf"

# orioledb-17 is pinned to 17.11+, which added output_plugin_libraries as an
# allow-list for logical decoding output plugins
RUN echo "output_plugin_libraries = 'pgoutput, test_decoding, wal2json'" >> "/etc/postgresql/postgresql.conf"

# Include schema migrations
COPY migrations/db /docker-entrypoint-initdb.d/
COPY ansible/files/pgbouncer_config/pgbouncer_auth_schema.sql /docker-entrypoint-initdb.d/init-scripts/00-schema.sql
Expand Down
8 changes: 8 additions & 0 deletions ansible/tasks/stage2-setup-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@
path: '/etc/postgresql/postgresql.conf'
state: 'present'

# orioledb-17 is pinned to 17.11+, which added output_plugin_libraries
# as an allow-list for logical decoding output plugins.
- name: Allow wal2json as a logical decoding output plugin
ansible.builtin.lineinfile:
line: "output_plugin_libraries = 'pgoutput, test_decoding, wal2json'"
path: '/etc/postgresql/postgresql.conf'
state: 'present'

- name: Add ORIOLEDB_ENABLED environment variable
ansible.builtin.lineinfile:
line: 'ORIOLEDB_ENABLED=true'
Expand Down
6 changes: 3 additions & 3 deletions ansible/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ postgres_major:
- "17"
- orioledb-17
postgres_release:
postgres15: "15.14.1.176"
postgres17: "17.6.1.176"
postgresorioledb-17: "17.9.0.029-orioledb"
postgresorioledb-17: "17.11.0.001-orioledb"
postgres17: "17.6.1.177"
postgres15: "15.14.1.177"
supabase_admin_agent_splay: 30s
###############################################################################################################
# The following block of yaml is for get_url and co throughout the playbook #
Expand Down
8 changes: 4 additions & 4 deletions docker/pgctld/orioledb-postgresql.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ wal_log_hints = 'on'
#------------------------------------------------------------------------------
shared_preload_libraries = 'pg_stat_statements, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, auto_explain, pg_tle, plan_filter, supabase_vault, orioledb'
default_table_access_method = 'orioledb'
orioledb.enable_rewind = true
orioledb.rewind_max_time = 1200
orioledb.rewind_max_transactions = 100000
orioledb.rewind_buffers = 1280
# orioledb-17 is pinned to 17.11+, which added output_plugin_libraries
# as an allow-list for logical decoding output plugins.
output_plugin_libraries = 'pgoutput, test_decoding, wal2json'

4 changes: 2 additions & 2 deletions migrations/schema-orioledb-17.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

\restrict SupabaseTestDumpKey123

-- Dumped from database version 17.9
-- Dumped by pg_dump version 17.9
-- Dumped from database version 17.11
-- Dumped by pg_dump version 17.11

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand Down
3 changes: 3 additions & 0 deletions nix/checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,9 @@
# Add orioledb to shared_preload_libraries
perl -pi -e "s/(shared_preload_libraries = ')/\$1orioledb, /" "$PGTAP_CLUSTER/postgresql.conf"
log info "OrioleDB added to shared_preload_libraries"
# orioledb-17 is pinned to 17.11+, which added output_plugin_libraries
# as an allow-list for logical decoding output plugins.
echo "output_plugin_libraries = 'pgoutput, test_decoding, wal2json'" >> "$PGTAP_CLUSTER/postgresql.conf"
fi

# Check if postgresql.conf exists
Expand Down
4 changes: 2 additions & 2 deletions nix/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ in
};
orioledb = {
"17" = {
version = "17_20";
hash = "sha256-HDrHTx9yeIPJoyIBs+BdAhBQqt1IEtQrG9pFfvHJqdg=";
version = "17_22";
hash = "sha256-B3ibVCa7dSdrrR6VyhuJ36Hp/lqmxmH5gauZpc9ylkA=";
};
};
};
Expand Down
8 changes: 4 additions & 4 deletions nix/ext/orioledb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "orioledb";
repo = "orioledb";
rev = "beta16";
sha256 = "sha256-HCfNzMPt80nGeVwlstUCeMpdNZYd9KhLLHYyD/Hvuhk=";
rev = "beta18";
sha256 = "sha256-kmNfneISVhlD9Pmnl69pkiAX77MzpzyJQB/5wQ1wiZc=";
};
version = "beta16";
version = "beta18";
buildInputs = [
curl
libkrb5
Expand All @@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
openssl
];
buildPhase = ''
make USE_PGXS=1 ORIOLEDB_PATCHSET_VERSION=20
make USE_PGXS=1 ORIOLEDB_PATCHSET_VERSION=22
'';
separateDebugInfo = true;
installPhase = ''
Expand Down
3 changes: 3 additions & 0 deletions nix/ext/tests/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ let
]
++ (lib.toList ((installedExtension "17").defaultSettings.shared_preload_libraries or [ ]));
default_table_access_method = "orioledb";
# orioledb-17 is pinned to 17.11+, which added output_plugin_libraries
# as an allow-list for logical decoding output plugins.
output_plugin_libraries = "pgoutput, test_decoding, wal2json";
}
);
initdbArgs = [
Expand Down
205 changes: 0 additions & 205 deletions nix/ext/tests/orioledb-rewind.nix

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ create index idx_persons_age on persons (age);
create index idx_living_persons_age on persons (age) where deceased is false;
create index idx_persons_age_desc on persons (age desc nulls last);
reindex index concurrently idx_persons_age;
WARNING: REINDEX CONCURRENTLY is not supported for orioledb tables yet, using a plain REINDEX instead
reindex table concurrently persons;
WARNING: REINDEX CONCURRENTLY is not supported for orioledb tables yet, using a plain REINDEX instead
NOTICE: skipping reindex of index "public.persons_pkey" concurrently
drop table persons cascade;
Loading
Loading