Skip to content

Commit

Permalink
Enable pg_tde extension if ENABLE_PG_TDE variable is set. (#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
maqeel75 authored Dec 26, 2024
1 parent fde43f9 commit fec283c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions percona-distribution-postgresql-17/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,22 @@ docker_temp_server_stop() {


pg_setup_pg_stat_monitor_and_pg_tde() {
docker_process_sql --dbname postgres <<-'EOSQL'
alter system set shared_preload_libraries=pg_stat_monitor,pg_tde ;
libraries='pg_stat_monitor'
if [[ -n "${ENABLE_PG_TDE}" && "${ENABLE_PG_TDE}" != "0" ]]; then
libraries='pg_stat_monitor,pg_tde'
fi
docker_process_sql --dbname postgres <<-EOSQL
alter system set shared_preload_libraries=${libraries} ;
EOSQL
}

pg_setup_percona_pg_telemetry() {
docker_process_sql --dbname postgres <<-'EOSQL'
alter system set shared_preload_libraries=pg_stat_monitor,percona_pg_telemetry,pg_tde ;
libraries='pg_stat_monitor,percona_pg_telemetry'
if [[ -n "${ENABLE_PG_TDE}" && "${ENABLE_PG_TDE}" != "0" ]]; then
libraries='pg_stat_monitor,percona_pg_telemetry,pg_tde'
fi
docker_process_sql --dbname postgres <<-EOSQL
alter system set shared_preload_libraries= ${libraries};
EOSQL
}

Expand Down

0 comments on commit fec283c

Please sign in to comment.