Available Versions

The following versions of PostgreSQL are currently available:

VersionStatusEnd-Of-Life DateDeprecation Date
12AvailableNovember 2024February 2025
13AvailableNovember 2025February 2026
14AvailableNovember 2026February 2027
15AvailableNovember 2027February 2028
16AvailableNovember 2028February 2029
17AvailableNovember 2029February 2030
PostgreSQL releases new major versions annually, and supports major versions for 5 years before it is considered end-of-life and no longer maintained.
For databases on EOL versions, Aptible will prevent new databases from being provisioned and mark existing database as DEPRECATED on the deprecation date listed above. While existing databases will not be affected, we recommend end-of-life databases to be upgraded. The latest version offered on Aptible will always be available for provisioning, regardless of end-of-life date.

Connecting to PostgreSQL

Aptible PostgreSQL Databases require authentication and SSL to connect.

Connecting with SSL

Most PostgreSQL clients will attempt connection over SSL by default. If yours doesn’t, try appending ?ssl=true to your connection URL, or review your client’s documentation.

Most PostgreSQL clients will not attempt verification of the server certificate by default, please consult your client’s documentation to enable verify-full, or your client’s equivalent option. The relevant documentation for libpq is here.

By default, PostgreSQL Databases on Aptible use a server certificate signed by Aptible for SSL / TLS termination. Databases that have been running since prior to Jan 15th, 2021 will only have a self-signed certificate. See Database Encryption in Transit for more details.

Extensions

Aptible supports two families of images for Postgres: default and contrib.

  • The default images have a minimal number of extensions installed, but do include PostGIS.
  • The alternative contrib images have a larger number of useful extensions installed. The list of available extensions is visible below.
  • In PostgreSQL versions 14 and newer, there is no sperate contrib image: the listed extension are avaiable in the default image.
ExtensionAvaiable in versions
plpythonu9.5 - 11
plpython2u9.5 - 11
plpython3u9.5 - 12
plperl9.5 - 12
plperlu9.5 - 12
mysql_fdw9.5 - 11
PLV89.5 - 10
multicorn9.5 - 10
wal2json9.5 - 16
pg-safeupdate9.5 - 11
pg_repack9.5 - 16
pgagent9.5 - 13
pgaudit9.5 - 13
pgcron10
pgvector15-16

If you require a particular PostgreSQL plugin, contact Aptible Support to identify whether a contrib image is a good fit. Alternatively, you can launch a new PostgreSQL database using a contrib image with the aptible db:create command.

Replication

Primary-standby replication is available for PostgreSQL. Replicas can be created using the aptible db:replicate command.

Failover

PostgreSQL replicas can be manually promoted to stop following the primary and start accepting writes. To do so, run one of the following commands depending on your Database’s version:

PostgreSQL 12 and higher

SELECT pg_promote();

PostgreSQL 11 and lower

COPY (SELECT 'fast') TO '/var/db/pgsql.trigger';

After the replica has been promoted, you should update your Apps to use the promoted replica as the primary Database. Once you start using the replica, you should not go back to using the original primary Database. Instead, continue using the promoted replica and create a new replica off of it.

Aptible maintains a link between replicas and their source Database to ensure the source Database cannot be deleted before the replica. To deprovision the source Database after you’ve failed over to a promoted replica, users with the appropriate roles and permissions can unlink the replica from the source Database. Navigate to the replica’s settings page to complete the unlinking process. See the Deprovisioning a Database documentation for considerations when deprovisioning a Database.

Data Integrity and Durability

On Aptible, PostgreSQL is configured with default settings for write-ahead logging. Committed transactions are therefore guaranteed to be written to disk.

Configuration

A PostgreSQL database’s pg_settings can be changed with ALTER SYSTEM. Changes made this way are written to disk and will persist across database restarts.

PostgreSQL databases on Aptible autotune the size of their caches and working memory based on the size of their container in order to improve performance. See the image’s public git repo for details.

The following settings are autotuned:

  • shared_buffers
  • effective_cache_size
  • work_mem
  • maintenance_work_mem
  • checkpoint_completion_target
  • default_statistics_target

Modifying these settings is not recommended as the setting will no longer scale with the size of the database’s container.

Connection Security

Aptible PostgreSQL Databases support connections via the following protocols:

  • For PostgreSQL versions 9.6, 10, 11, and 12: TLSv1.0, TLSv1.1, TLSv1.2
  • For PostgreSQL versions 13 and 14: TLSv1.2
  • For PostgreSQL versions 15 and 16: TLSv1.2, TLSv1.3

Was this page helpful?