PG-2372 - Remove ENABLE_TDE flag (18)#981
Conversation
This PR updates the docker installation step to remove the ENABLE TDE option.
shahidullah79
left a comment
There was a problem hiding this comment.
The suggested command in the doc is incorrect.
docker run --name container-name -e POSTGRES_PASSWORD=sUpers3cRet -c 'shared_preload_libraries=pg_tde' -d percona/percona-distribution-postgresql:{{dockertag}}
It should be
docker run --name container-name -e POSTGRES_PASSWORD=sUpers3cRet -d percona/percona-distribution-postgresql:{{dockertag}} -c 'shared_preload_libraries=pg_tde'
Reason:
The docker run command interprets the -c flag as --cpu-shares (which expects an integer), rather than passing it down as a configuration parameter to PostgreSQL.
To pass configuration flags directly to the underlying PostgreSQL engine in a Docker container, you need to append them to the very end of your command string, after the image name.
In a docker run statement, everything specified before the image name (percona/percona-distribution-postgresql:18.4) belongs to the Docker CLI engine. Everything specified after the image name is treated as an argument override passed directly to the container's entrypoint script (in this case, postgres).
By shifting -c shared_preload_libraries=pg_tde to the end, Docker stops trying to parse it as a CPU limitation flag and safely hand-delivers it to PostgreSQL at boot.
This PR is a backport of this issue #981.
This PR updates the docker installation step to remove the ENABLE TDE option.