|latest/stable||20||20 Sep 2022|
|14/stable||73||18 Apr 2023|
|14/candidate||139||19 Sep 2023|
|14/beta||145||26 Sep 2023|
juju deploy postgresql-k8s --channel 14/stable
How to enable plugins/extensions
Warning: The feature is currently available in the channel
14/edge only (revision 103+) and will be released to the channel
Enable plugins/extensions requires that you:
Enable the plugin/extension by setting
True as the value of its respective config option, like in the following example:
juju config postgresql-k8s plugin_<plugin name>_enable=True
Then you can relate your application charm with the PostgreSQL application and it should work as expected.
If your application charm requests extensions through
db-admin relation data, but the extension is not enabled yet, you’ll see that the PostgreSQL application goes to a blocked state with the following message:
postgresql-k8s/0* blocked idle 10.1.123.30 extensions requested through relation
Also, in the Juju debug logs we can see the list of extensions that need to be enabled:
unit-postgresql-k8s-0: 18:04:51 ERROR unit.postgresql-k8s/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.
Not all PostgreSQL extensions are available. The list of supported extensions is available at Supported plugins/extensions.