Skip to content

Commit 330bcb2

Browse files
authored
Configure TimescaleDB license and user privileges
Added TimescaleDB license configuration and granted superuser privileges to the PostgreSQL user.
1 parent 399a534 commit 330bcb2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/postgres-init.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ if [ ! -s "$PGDATA/PG_VERSION" ]; then
5959
echo "shared_buffers = 128MB" >> "$PGDATA/postgresql.conf"
6060
# TimescaleDB requires shared_preload_libraries
6161
echo "shared_preload_libraries = 'timescaledb'" >> "$PGDATA/postgresql.conf"
62+
echo "timescaledb.license = 'timescale'" >> "$PGDATA/postgresql.conf"
6263

6364
# Start PostgreSQL temporarily to run init scripts
6465
echo "Starting PostgreSQL for initialization..."
@@ -82,6 +83,7 @@ EOSQL
8283
CREATE USER "$POSTGRES_USER" WITH PASSWORD '$POSTGRES_PASSWORD';
8384
CREATE DATABASE "$POSTGRES_DB" OWNER "$POSTGRES_USER";
8485
GRANT ALL PRIVILEGES ON DATABASE "$POSTGRES_DB" TO "$POSTGRES_USER";
86+
ALTER USER "$POSTGRES_USER" WITH SUPERUSER;
8587
EOSQL
8688

8789
# Restart PostgreSQL to load shared_preload_libraries for TimescaleDB

0 commit comments

Comments
 (0)