Skip to content

Commit ceec7d5

Browse files
committed
Run timescale DB tune script on DB migration
1 parent ca48317 commit ceec7d5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

or-entrypoint.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ if [ -n "$DATABASE_ALREADY_EXISTS" ]; then
1717
else
1818
echo "Adding shared_preload_libraries = 'timescaledb' to postgresql.conf"
1919
echo "shared_preload_libraries = 'timescaledb'" >> "$PGDATA/postgresql.conf"
20+
echo "timescaledb.telemetry_level=off" >> "$PGDATA/postgresql.conf"
2021
fi
21-
22+
2223
# Do re-indexing check
2324
if [ "$OR_DISABLE_REINDEX" == 'true' ] || [ -z "$OR_REINDEX_COUNTER" ]; then
2425
echo "REINDEX check is disabled"
@@ -28,8 +29,11 @@ if [ -n "$DATABASE_ALREADY_EXISTS" ]; then
2829
if [ -f "$REINDEX_FILE" ]; then
2930
echo "REINDEX file '$REINDEX_FILE' already exists so no re-indexing required"
3031
else
31-
echo "REINDEX file '$REINDEX_FILE' doesn't exist so re-indexing the DB..."
32+
echo "REINDEX file '$REINDEX_FILE' doesn't exist"
3233
docker_temp_server_start "$@"
34+
echo "Running timescaledb tune script..."
35+
/docker-entrypoint-initdb.d/001_timescaledb_tune.sh
36+
echo "Re-indexing the DB..."
3337
docker_process_sql -c "REINDEX database $POSTGRES_DB;"
3438
docker_temp_server_stop
3539
echo 'REINDEX completed!'

0 commit comments

Comments
 (0)