DATABASES Signal 205
pglayers: PostgreSQL extensions as stackable Docker layers
This approach eliminates the need to compile extensions locally or include build tools in production database images, streamlining container builds. It also provides pre-configured images matching managed services like Azure Database for PostgreSQL, simplifying local development and testing. For PostgreSQL 18 and later, the project leverages new path configurations to isolate extensions, preventing file collisions and enabling deploy-time mounting.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
The project provides 53 pre-built extensions as minimal Docker images that can be added to the official postgres image using the COPY --from instruction.
A full image is available with all extensions and pre-configured settings, including a specific profile that matches the extensions available on Azure Database for PostgreSQL Flexible Server.
For PostgreSQL 18 and newer, pglayers uses new path configuration variables to isolate extensions in separate directories, which prevents file collisions and is compatible with CloudNativePG version 1.27 and above.
THE CLUSTER