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
14/stable 363 21 Feb 2024
Ubuntu 22.04
14/candidate 405 03 May 2024
Ubuntu 22.04
14/beta 409 Today
Ubuntu 22.04
14/edge 409 21 May 2024
Ubuntu 22.04
juju deploy postgresql --channel 14/stable
Show information




Charmed PostgreSQL resource utilization depends on the chosen profile:

juju deploy postgresql --config profile=testing

Profile values

Value Description Tech details
Maximum performance 25% of the available memory for shared_buffers and the remain as cache memory (defaults mimic legacy charm behaviour).
The max_connections=max(4 * os.cpu_count(), 100).
Use pgbouncer if max_connections are not enough (reasoning).
testing Minimal resource usage PostgreSQL 14 defaults.

Config change

Note: Pre-deployed application profile change is planned but currently is NOT supported.

To change the profile, use juju config (see all charm configs):

juju deploy postgresql --config profile=testing && \
juju config postgresql profile=production

Juju Constraints

Juju constraints allows RAM/CPU limits for Juju units:

juju deploy postgresql --constraints cores=8 mem=16G

Juju constraints can be used together with charm profile:

juju deploy postgresql --constraints cores=8 mem=16G --config profile=testing

Help improve this document in the forum (guidelines). Last updated 2 months ago.