Skip to content

Speed up the deployment of a Postgres cluster by using a GCP disk image

Vitaliy Kukharik requested to merge speed-up into master

Speed up the deployment of a Postgres cluster by using a GCP disk image
on which the necessary (and additional) software is pre-installed:

ii  postgresql-12                      12.17-1.pgdg22.04+1                     amd64        The World's Most Advanced Open Source Relational Database
ii  postgresql-12-citus-10.2           10.2.9.citus-1                          amd64        sharding and distributed joins for PostgreSQL
ii  postgresql-12-cron                 1.6.2-1.pgdg22.04+1                     amd64        Run periodic jobs in PostgreSQL
ii  postgresql-12-dbgsym               12.17-1.pgdg22.04+1                     amd64        debug symbols for postgresql-12
ii  postgresql-12-partman              4.7.4-2.pgdg22.04+1                     amd64        PostgreSQL Partition Manager
ii  postgresql-12-pg-stat-kcache       2.2.2-2.pgdg22.04+1                     amd64        PostgreSQL extension to gather per-query kernel statistics.
ii  postgresql-12-pg-wait-sampling     1.1.5-1.pgdg22.04+1                     amd64        Extension providing statistics about PostgreSQL wait events
ii  postgresql-12-pgaudit              1.4.3-1.pgdg22.04+1                     amd64        PostgreSQL Audit Extension
ii  postgresql-12-pgrouting            3.6.1-1.pgdg22.04+1                     amd64        Routing functionality support for PostgreSQL/PostGIS
ii  postgresql-12-pgrouting-scripts    3.6.1-1.pgdg22.04+1                     all          Routing functionality support for PostgreSQL/PostGIS - SQL scripts
ii  postgresql-12-pgvector             0.5.1-1.pgdg22.04+1                     amd64        Open-source vector similarity search for Postgres
ii  postgresql-12-postgis-3            3.4.1+dfsg-1.pgdg22.04+1                amd64        Geographic objects support for PostgreSQL 12
ii  postgresql-12-postgis-3-scripts    3.4.1+dfsg-1.pgdg22.04+1                all          Geographic objects support for PostgreSQL 12 -- SQL scripts
ii  postgresql-12-repack               1.5.0-1.pgdg22.04+1                     amd64        reorganize tables in PostgreSQL databases with minimal locks
ii  postgresql-13                      13.13-1.pgdg22.04+1                     amd64        The World's Most Advanced Open Source Relational Database
ii  postgresql-13-citus-11.3           11.3.0.citus-1                          amd64        sharding and distributed joins for PostgreSQL
ii  postgresql-13-cron                 1.6.2-1.pgdg22.04+1                     amd64        Run periodic jobs in PostgreSQL
ii  postgresql-13-dbgsym               13.13-1.pgdg22.04+1                     amd64        debug symbols for postgresql-13
ii  postgresql-13-partman              4.7.4-2.pgdg22.04+1                     amd64        PostgreSQL Partition Manager
ii  postgresql-13-pg-stat-kcache       2.2.2-2.pgdg22.04+1                     amd64        PostgreSQL extension to gather per-query kernel statistics.
ii  postgresql-13-pg-wait-sampling     1.1.5-1.pgdg22.04+1                     amd64        Extension providing statistics about PostgreSQL wait events
ii  postgresql-13-pgaudit              1.5.2-1.pgdg22.04+1                     amd64        PostgreSQL Audit Extension
ii  postgresql-13-pgrouting            3.6.1-1.pgdg22.04+1                     amd64        Routing functionality support for PostgreSQL/PostGIS
ii  postgresql-13-pgrouting-scripts    3.6.1-1.pgdg22.04+1                     all          Routing functionality support for PostgreSQL/PostGIS - SQL scripts
ii  postgresql-13-pgvector             0.5.1-1.pgdg22.04+1                     amd64        Open-source vector similarity search for Postgres
ii  postgresql-13-postgis-3            3.4.1+dfsg-1.pgdg22.04+1                amd64        Geographic objects support for PostgreSQL 13
ii  postgresql-13-postgis-3-scripts    3.4.1+dfsg-1.pgdg22.04+1                all          Geographic objects support for PostgreSQL 13 -- SQL scripts
ii  postgresql-13-repack               1.5.0-1.pgdg22.04+1                     amd64        reorganize tables in PostgreSQL databases with minimal locks
ii  postgresql-14                      14.10-1.pgdg22.04+1                     amd64        The World's Most Advanced Open Source Relational Database
ii  postgresql-14-citus-12.1           12.1.1.citus-1                          amd64        sharding and distributed joins for PostgreSQL
ii  postgresql-14-cron                 1.6.2-1.pgdg22.04+1                     amd64        Run periodic jobs in PostgreSQL
ii  postgresql-14-dbgsym               14.10-1.pgdg22.04+1                     amd64        debug symbols for postgresql-14
ii  postgresql-14-partman              5.0.1-1.pgdg22.04+1                     amd64        PostgreSQL Partition Manager
ii  postgresql-14-pg-stat-kcache       2.2.2-2.pgdg22.04+1                     amd64        PostgreSQL extension to gather per-query kernel statistics.
ii  postgresql-14-pg-wait-sampling     1.1.5-1.pgdg22.04+1                     amd64        Extension providing statistics about PostgreSQL wait events
ii  postgresql-14-pgaudit              1.6.2-1.pgdg22.04+1                     amd64        PostgreSQL Audit Extension
ii  postgresql-14-pgrouting            3.6.1-1.pgdg22.04+1                     amd64        Routing functionality support for PostgreSQL/PostGIS
ii  postgresql-14-pgrouting-scripts    3.6.1-1.pgdg22.04+1                     all          Routing functionality support for PostgreSQL/PostGIS - SQL scripts
ii  postgresql-14-pgvector             0.5.1-1.pgdg22.04+1                     amd64        Open-source vector similarity search for Postgres
ii  postgresql-14-postgis-3            3.4.1+dfsg-1.pgdg22.04+1                amd64        Geographic objects support for PostgreSQL 14
ii  postgresql-14-postgis-3-scripts    3.4.1+dfsg-1.pgdg22.04+1                all          Geographic objects support for PostgreSQL 14 -- SQL scripts
ii  postgresql-14-repack               1.5.0-1.pgdg22.04+1                     amd64        reorganize tables in PostgreSQL databases with minimal locks
ii  postgresql-15                      15.5-1.pgdg22.04+1                      amd64        The World's Most Advanced Open Source Relational Database
ii  postgresql-15-citus-12.1           12.1.1.citus-1                          amd64        sharding and distributed joins for PostgreSQL
ii  postgresql-15-cron                 1.6.2-1.pgdg22.04+1                     amd64        Run periodic jobs in PostgreSQL
ii  postgresql-15-dbgsym               15.5-1.pgdg22.04+1                      amd64        debug symbols for postgresql-15
ii  postgresql-15-partman              5.0.1-1.pgdg22.04+1                     amd64        PostgreSQL Partition Manager
ii  postgresql-15-pg-stat-kcache       2.2.2-2.pgdg22.04+1                     amd64        PostgreSQL extension to gather per-query kernel statistics.
ii  postgresql-15-pg-wait-sampling     1.1.5-1.pgdg22.04+1                     amd64        Extension providing statistics about PostgreSQL wait events
ii  postgresql-15-pgaudit              1.7.0-2.pgdg22.04+1                     amd64        PostgreSQL Audit Extension
ii  postgresql-15-pgrouting            3.6.1-1.pgdg22.04+1                     amd64        Routing functionality support for PostgreSQL/PostGIS
ii  postgresql-15-pgrouting-scripts    3.6.1-1.pgdg22.04+1                     all          Routing functionality support for PostgreSQL/PostGIS - SQL scripts
ii  postgresql-15-pgvector             0.5.1-1.pgdg22.04+1                     amd64        Open-source vector similarity search for Postgres
ii  postgresql-15-postgis-3            3.4.1+dfsg-1.pgdg22.04+1                amd64        Geographic objects support for PostgreSQL 15
ii  postgresql-15-postgis-3-scripts    3.4.1+dfsg-1.pgdg22.04+1                all          Geographic objects support for PostgreSQL 15 -- SQL scripts
ii  postgresql-15-repack               1.5.0-1.pgdg22.04+1                     amd64        reorganize tables in PostgreSQL databases with minimal locks
ii  postgresql-16                      16.1-1.pgdg22.04+1                      amd64        The World's Most Advanced Open Source Relational Database
ii  postgresql-16-citus-12.1           12.1.1.citus-1                          amd64        sharding and distributed joins for PostgreSQL
ii  postgresql-16-cron                 1.6.2-1.pgdg22.04+1                     amd64        Run periodic jobs in PostgreSQL
ii  postgresql-16-dbgsym               16.1-1.pgdg22.04+1                      amd64        debug symbols for postgresql-16
ii  postgresql-16-partman              5.0.1-1.pgdg22.04+1                     amd64        PostgreSQL Partition Manager
ii  postgresql-16-pg-stat-kcache       2.2.2-2.pgdg22.04+1                     amd64        PostgreSQL extension to gather per-query kernel statistics.
ii  postgresql-16-pg-wait-sampling     1.1.5-1.pgdg22.04+1                     amd64        Extension providing statistics about PostgreSQL wait events
ii  postgresql-16-pgaudit              16.0-1.pgdg22.04+1                      amd64        PostgreSQL Audit Extension
ii  postgresql-16-pgrouting            3.6.1-1.pgdg22.04+1                     amd64        Routing functionality support for PostgreSQL/PostGIS
ii  postgresql-16-pgrouting-scripts    3.6.1-1.pgdg22.04+1                     all          Routing functionality support for PostgreSQL/PostGIS - SQL scripts
ii  postgresql-16-pgvector             0.5.1-1.pgdg22.04+1                     amd64        Open-source vector similarity search for Postgres
ii  postgresql-16-postgis-3            3.4.1+dfsg-1.pgdg22.04+1                amd64        Geographic objects support for PostgreSQL 16
ii  postgresql-16-postgis-3-scripts    3.4.1+dfsg-1.pgdg22.04+1                all          Geographic objects support for PostgreSQL 16 -- SQL scripts
ii  postgresql-16-repack               1.5.0-1.pgdg22.04+1                     amd64        reorganize tables in PostgreSQL databases with minimal locks
ii  postgresql-client-12               12.17-1.pgdg22.04+1                     amd64        front-end programs for PostgreSQL 12
ii  postgresql-client-13               13.13-1.pgdg22.04+1                     amd64        front-end programs for PostgreSQL 13
ii  postgresql-client-14               14.10-1.pgdg22.04+1                     amd64        front-end programs for PostgreSQL 14
ii  postgresql-client-15               15.5-1.pgdg22.04+1                      amd64        front-end programs for PostgreSQL 15
ii  postgresql-client-16               16.1-1.pgdg22.04+1                      amd64        front-end programs for PostgreSQL 16
ii  postgresql-client-common           256.pgdg22.04+1                         all          manager for multiple PostgreSQL client versions
ii  postgresql-common                  256.pgdg22.04+1                         all          PostgreSQL database-cluster manager
ii  postgresql-server-dev-12           12.17-1.pgdg22.04+1                     amd64        development files for PostgreSQL 12 server-side programming
ii  postgresql-server-dev-13           13.13-1.pgdg22.04+1                     amd64        development files for PostgreSQL 13 server-side programming
ii  postgresql-server-dev-14           14.10-1.pgdg22.04+1                     amd64        development files for PostgreSQL 14 server-side programming
ii  postgresql-server-dev-15           15.5-1.pgdg22.04+1                      amd64        development files for PostgreSQL 15 server-side programming
ii  postgresql-server-dev-16           16.1-1.pgdg22.04+1                      amd64        development files for PostgreSQL 16 server-side programming
ii  timescaledb-2-loader-postgresql-12 2.11.2~ubuntu22.04                      amd64        The loader for TimescaleDB to load individual versions.
ii  timescaledb-2-loader-postgresql-13 2.13.1~ubuntu22.04                      amd64        The loader for TimescaleDB to load individual versions.
ii  timescaledb-2-loader-postgresql-14 2.13.1~ubuntu22.04                      amd64        The loader for TimescaleDB to load individual versions.
ii  timescaledb-2-loader-postgresql-15 2.13.1~ubuntu22.04                      amd64        The loader for TimescaleDB to load individual versions.
ii  timescaledb-2-loader-postgresql-16 2.13.1~ubuntu22.04                      amd64        The loader for TimescaleDB to load individual versions.
ii  timescaledb-2-postgresql-12        2.11.2~ubuntu22.04                      amd64        An open-source time-series database based on PostgreSQL, as an extension.
ii  timescaledb-2-postgresql-13        2.13.1~ubuntu22.04                      amd64        An open-source time-series database based on PostgreSQL, as an extension.
ii  timescaledb-2-postgresql-14        2.13.1~ubuntu22.04                      amd64        An open-source time-series database based on PostgreSQL, as an extension.
ii  timescaledb-2-postgresql-15        2.13.1~ubuntu22.04                      amd64        An open-source time-series database based on PostgreSQL, as an extension.
ii  timescaledb-2-postgresql-16        2.13.1~ubuntu22.04                      amd64        An open-source time-series database based on PostgreSQL, as an extension.
ii  timescaledb-toolkit-postgresql-12  1:1.18.0~ubuntu22.04                    amd64        Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities, compatible with TimescaleDB and PostgreSQL
ii  timescaledb-toolkit-postgresql-13  1:1.18.0~ubuntu22.04                    amd64        Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities, compatible with TimescaleDB and PostgreSQL
ii  timescaledb-toolkit-postgresql-14  1:1.18.0~ubuntu22.04                    amd64        Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities, compatible with TimescaleDB and PostgreSQL
ii  timescaledb-toolkit-postgresql-15  1:1.18.0~ubuntu22.04                    amd64        Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities, compatible with TimescaleDB and PostgreSQL
ii  timescaledb-toolkit-postgresql-16  1:1.18.0~ubuntu22.04                    amd64        Library of analytical hyperfunctions, time-series pipelining, and other SQL utilities, compatible with TimescaleDB and PostgreSQL

Result:

It took ~3 minutes (1 minute is the pipeline preparation, 2 minutes cluster deployment) to create the server and deploy the cluster instead of 6-8 minutes before.

image

Edited by Vitaliy Kukharik

Merge request reports