Charmed PostgreSQL VM

Channel Revision Published Runs on
latest/stable 345 09 Nov 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/stable 239 09 Feb 2022
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/stable 226 01 Apr 2021
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
14/stable 430 28 Jun 2024
Ubuntu 22.04
14/stable 429 28 Jun 2024
Ubuntu 22.04
14/candidate 468 02 Sep 2024
Ubuntu 22.04
14/candidate 467 02 Sep 2024
Ubuntu 22.04
14/beta 468 02 Sep 2024
Ubuntu 22.04
14/beta 467 02 Sep 2024
Ubuntu 22.04
14/edge 472 Yesterday
Ubuntu 22.04
14/edge 471 Yesterday
Ubuntu 22.04
juju deploy postgresql --channel 14/edge
Show information

Platform:

Ubuntu
22.04 20.04 18.04 16.04 14.04

How to enable plugins/extensions

This guide outlines the steps for enabling an extension in a Charmed PostgreSQL deployment.

For a list of available extensions, see the page Supported plugins/extensions. The words “plugin” and “extension” will be used interchangeably.

Prerequisites

Enable extension

Enable the extension by setting True as the value of its respective config option, like in the following example:

juju config postgresql plugin_<plugin name>_enable=True

Integrate your application

Integrate (formerly known as “relate” in juju v.2.9) your application charm with the PostgreSQL charm:

juju integrate <application charm> postgresql 

If your application charm requests extensions through db or db-admin relation data, but the extension is not enabled yet, you’ll see that the PostgreSQL application goes into a blocked state with the following message:

postgresql/0*  blocked   idle   10.1.123.30            extensions requested through relation

In the Juju debug logs we can see the list of extensions that need to be enabled:

unit-postgresql-0: 18:04:51 ERROR unit.postgresql/0.juju-log db:5: ERROR - `extensions` (pg_trgm, unaccent) cannot be requested through relations - Please enable extensions through `juju config` and add the relation again.

After enabling the needed extensions through the config options, the charm will unblock. If you have removed the relation, you can add it back again.

If the application charm uses the new postgresql_client interface, it can use the is_postgresql_plugin_enabled helper method from the data interfaces library to check whether the plugin/extension is already enabled in the database.

Note: Not all PostgreSQL extensions are available. The list of supported extensions is available at Supported plugins/extensions.