Skip to content

Commit 8150aa8

Browse files
committed
feat: restore TimescaleDB extension support for PostgreSQL 17
restores TimescaleDB support for PostgreSQL 17 by: 1. Adding TimescaleDB 2.23.0 to versions.json with PG 15 & 17 support 2. Removing timescaledb from filtered extensions list for PG 17 3. Removing sed commands that stripped timescaledb from Dockerfile-17 4. Updating migration test to support PG versions up to 18 5. Keeping timescaledb in shared_preload_libraries (postgresql.conf.j2) TimescaleDB 2.23.0 is the first version to officially support PostgreSQL 17. Previously filtered in PR #1321, now restored following contribution guidelines.
1 parent ab99074 commit 8150aa8

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

Dockerfile-17

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,9 @@ RUN sed -i \
202202
chown postgres:postgres /etc/postgresql-custom
203203

204204
# Remove items from postgresql.conf
205-
RUN sed -i 's/ timescaledb,//g;' "/etc/postgresql/postgresql.conf"
206205
#as of pg 16.4 + this db_user_namespace totally deprecated and will break the server if setting is present
207-
RUN sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "/etc/postgresql/postgresql.conf"
208-
RUN sed -i 's/ timescaledb,//g; s/ plv8,//g' "/etc/postgresql-custom/supautils.conf"
206+
RUN sed -i 's/db_user_namespace = off/#db_user_namespace = off/g;' "/etc/postgresql/postgresql.conf"
207+
RUN sed -i 's/ plv8,//g' "/etc/postgresql-custom/supautils.conf"
209208

210209

211210

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ This is the same PostgreSQL build that powers [Supabase](https://supabase.io), b
218218
| [postgis](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | [3.3.7](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | Geographic Objects for PostgreSQL |
219219
| [rum]() | [1.3]() | |
220220
| [supautils](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz) | [2.9.4](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz) | PostgreSQL extension for enhanced security |
221-
| [timescaledb]() | [2.9.1]() | |
221+
| [timescaledb](https://github.com/timescale/timescaledb/archive/2.16.1.tar.gz) | [2.16.1](https://github.com/timescale/timescaledb/archive/2.16.1.tar.gz) | Scales PostgreSQL for time-series data via automatic partitioning across time and space |
222222
| [vault](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz) | [0.3.1](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz) | Store encrypted secrets in PostgreSQL |
223223
| [vector]() | [0.8.0]() | |
224224
| [wal2json](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | [2_6](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | PostgreSQL JSON output plugin for changeset extraction |
@@ -251,6 +251,7 @@ This is the same PostgreSQL build that powers [Supabase](https://supabase.io), b
251251
| [postgis](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | [3.3.7](https://download.osgeo.org/postgis/source/postgis-3.3.7.tar.gz) | Geographic Objects for PostgreSQL |
252252
| [rum]() | [1.3]() | |
253253
| [supautils](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz) | [2.9.4](https://github.com/supabase/supautils/archive/refs/tags/v2.9.4.tar.gz) | PostgreSQL extension for enhanced security |
254+
| [timescaledb](https://github.com/timescale/timescaledb/archive/2.23.0.tar.gz) | [2.23.0](https://github.com/timescale/timescaledb/archive/2.23.0.tar.gz) | Scales PostgreSQL for time-series data via automatic partitioning across time and space |
254255
| [vault](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz) | [0.3.1](https://github.com/supabase/vault/archive/refs/tags/v0.3.1.tar.gz) | Store encrypted secrets in PostgreSQL |
255256
| [vector]() | [0.8.0]() | |
256257
| [wal2json](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | [2_6](https://github.com/eulerto/wal2json/archive/wal2json_2_6.tar.gz) | PostgreSQL JSON output plugin for changeset extraction |

migrations/tests/extensions/10-timescaledb.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
begin;
22
do $_$
33
begin
4-
if current_setting('server_version_num')::integer >= 150000 and current_setting('server_version_num')::integer < 160000 then
4+
if current_setting('server_version_num')::integer >= 150000 and current_setting('server_version_num')::integer < 180000 then
55
create extension if not exists timescaledb with schema "extensions";
66
end if;
77
end

nix/ext/versions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,13 @@
519519
"15"
520520
],
521521
"hash": "sha256-sLxWdBmih9mgiO51zLLxn9uwJVYc5JVHJjSWoADoJ+w="
522+
},
523+
"2.23.0": {
524+
"postgresql": [
525+
"15",
526+
"17"
527+
],
528+
"hash": "sha256-f965840ef9ba969b874c5825ca9a1e8cca667783d7c8bab623ffacb8d95b2d68"
522529
}
523530
},
524531
"vector": {

nix/packages/postgres.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,14 @@
4747

4848
#Where we import and build the orioledb extension, we add on our custom extensions
4949
# plus the orioledb option
50-
#we're not using timescaledb or plv8 in the orioledb-17 version or pg 17 of supabase extensions
50+
#we're not using timescaledb or plv8 in the orioledb-17 version
5151
orioleFilteredExtensions = builtins.filter (
5252
x: x != ../ext/timescaledb.nix && x != ../ext/timescaledb-2.9.1.nix && x != ../ext/plv8
5353
) ourExtensions;
5454

5555
orioledbExtensions = orioleFilteredExtensions ++ [ ../ext/orioledb.nix ];
56-
dbExtensions17 = orioleFilteredExtensions;
56+
# pg 17 of supabase extensions - only filter out plv8
57+
dbExtensions17 = builtins.filter (x: x != ../ext/plv8) ourExtensions;
5758
getPostgresqlPackage = version: pkgs."postgresql_${version}";
5859
# Create a 'receipt' file for a given postgresql package. This is a way
5960
# of adding a bit of metadata to the package, which can be used by other

0 commit comments

Comments
 (0)