CircleCI-Public / cimg-postgres

MIT License
8 stars 24 forks source link

feat: add support for PG Partman #89

Closed stig closed 1 year ago

stig commented 1 year ago

Description

This adds PG Partman support to the base image.

From https://github.com/pgpartman/pg_partman:

pg_partman is an extension to create and manage both time-based and serial-based table partition sets. Native partitioning in PostgreSQL 10 is supported as of pg_partman v3.0.1 and much more extensively as of 4.0.0 along with PostgreSQL 11.

I opted to not install the background worker, since the base image already has pg_cron.

Size changes

This appears to add about 20 MB to the base image size, when building as a separate layer:

$ docker image ls | grep cimg/post
cimg/postgres               12.9-partman          586ec1dac200   About an hour ago   2.1GB
cimg/postgres               12.9                  37dfce59e2e3   18 months ago       2.08GB

Reasons

I would like to use Partman for local development and in CI so that my schema can match the production version.

Checklist

Please check through the following before opening your PR. Thank you!