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 468 11 Sep 2024
Ubuntu 22.04
14/stable 467 11 Sep 2024
Ubuntu 22.04
14/candidate 468 02 Sep 2024
Ubuntu 22.04
14/candidate 467 02 Sep 2024
Ubuntu 22.04
14/beta 516 19 Nov 2024
Ubuntu 22.04
14/beta 515 19 Nov 2024
Ubuntu 22.04
14/edge 518 19 Nov 2024
Ubuntu 22.04
14/edge 517 19 Nov 2024
Ubuntu 22.04
juju deploy postgresql --channel latest/stable
Show information

Platform:

Ubuntu
22.04 20.04 18.04 16.04 14.04

Learn about configurations >

  • admin_addresses | string

    A comma-separated list of IP Addresses (or single IP) admin tools like pgAdmin3 will connect from. The IP addresses added here will be included in the pg_hba.conf file allowing ip connections to all databases on the server from the given IP addresses using md5 password encryption. IP address ranges are also supported, using the standard format described in the PostgreSQL reference guide.

  • advisory_lock_restart_key | int

    Default: 765

    DEPRECATED and ignored.

  • archive_command | string

    DEPRECATED. Use extra_pg_conf.

  • archive_mode | boolean

    DEPRECATED. Use extra_pg_conf.

  • autovacuum | boolean

    Default: True

    DEPRECATED. Use extra_pg_conf.

  • autovacuum_analyze_scale_factor | float

    Default: 0.1

    DEPRECATED. Use extra_pg_conf.

  • autovacuum_analyze_threshold | int

    Default: 50

    DEPRECATED. Use extra_pg_conf.

  • autovacuum_vacuum_cost_delay | string

    Default: 20ms

    DEPRECATED. Use extra_pg_conf.

  • autovacuum_vacuum_scale_factor | float

    Default: 0.2

    DEPRECATED. Use extra_pg_conf.

  • aws_access_key_id | string

    EXPERIMENTAL. Amazon AWS access key id.

  • aws_region | string

    EXPERIMENTAL. Amazon AWS region (eg. us-east-1)

  • aws_secret_access_key | string

    EXPERIMENTAL. Amazon AWS secret access key.

  • backup_compression_level | int

    Backup compression level. Zero means no compression.

  • backup_dir | string

    Default: /var/lib/postgresql/backups

    Directory to place backups in.

  • backup_retention_count | int

    Default: 7

    Number of backups to retain.

  • backup_schedule | string

    Default: 13 4 * * *

    Cron-formatted schedule for regular database backups.

  • checkpoint_completion_target | float

    Default: 0.9

    DEPRECATED. Use extra_pg_conf.

  • checkpoint_segments | int

    Default: 10

    DEPRECATED. Use extra_pg_conf.

  • checkpoint_timeout | string

    DEPRECATED. Use extra_pg_conf.

  • collapse_limit | int

    Default: -1

    DEPRECATED. Use extra_pg_conf.

  • default_statistics_target | int

    Default: -1

    DEPRECATED. Use extra_pg_conf.

  • effective_cache_size | string

    DEPRECATED. Use extra_pg_conf.

  • encoding | string

    Default: UTF-8

    Default encoding used to store text in this service. Can only be set when deploying the first unit of a service.

  • extra-packages | string

    DEPRECATED. Use extra_packages.

  • extra_packages | string

    Space separated list of extra deb packages to install.

  • extra_pg_auth | string

    A extra pg_hba.conf auth rules. This will be included as-is into the pg_hba.conf file. Note that this should not be needed as db relations already create those rules the right way. Use this feature to allow clients to connect from outside the environment, or to configure replication between unrelated PostgreSQL services using the manual_replication option.

  • extra_pg_conf | string

    Default: # Additional service specific postgresql.conf settings. listen_addresses='*' ssl=true # log_timezone=UTC Bug #1580331 log_checkpoints=true log_connections=true log_disconnections=true log_autovacuum_min_duration=-1 log_line_prefix='%t [%p]: [%l-1] db=%d,user=%u ' archive_mode=on archive_command='/bin/true' hot_standby=true max_wal_senders=10 # max_wal_senders=num_units * 2 + 5 # wal_level=hot_standby (<9.4) or logical (>=9.4) # shared_buffers=total_ram*0.25 # effective_cache_size=total_ram*0.75 default_statistics_target=250 from_collapse_limit=16 join_collapse_limit=16 wal_buffers=-1 checkpoint_completion_target=0.9 # password_encryption=true max_connections=100

    postgresql.conf settings, one per line in standard key=value PostgreSQL format. These settings will generally override any values selected by the charm. The charm however will attempt to ensure minimum requirements for the charm's operation are met.

  • fsync | boolean

    Default: True

    DEPRECATED. Use extra_pg_conf.

  • full_page_writes | boolean

    Default: True

    DEPRECATED. Use extra_pg_conf.

  • hot_standby | boolean

    DEPRECATED. Use extra_pg_conf.

  • hot_standby_feedback | boolean

    DEPRECATED. Use extra_pg_conf.

  • idle_reap_secs | int

    Default: 900

    Terminate transactions that have been idle more than this many seconds. While this may seem harsh, in most environments it is preferable to allowing them to create database bloat and hold locks needed by well behaved transactions. Set to 0 to disable.

  • install_keys | string

    List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.

  • install_sources | string

    List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.

  • kernel_shmall | int

    DEPRECATED and ignored.

  • kernel_shmmax | int

    DEPRECATED and ignored.

  • listen_port | int

    Default: -1

    DEPRECATED. Use extra_pg_conf.

  • locale | string

    Default: C

    Locale of service, defining language, default collation order, and default formatting of numbers, currency, dates & times. Can only be set when deploying the first unit of a service.

  • log_autovacuum_min_duration | int

    Default: -1

    DEPRECATED. Use extra_pg_conf.

  • log_checkpoints | boolean

    DEPRECATED. Use extra_pg_conf.

  • log_connections | boolean

    DEPRECATED. Use extra_pg_conf.

  • log_disconnections | boolean

    DEPRECATED. Use extra_pg_conf.

  • log_line_prefix | string

    Default: %t [%p]: [%l-1] db=%d,user=%u

    DEPRECATED. Use extra_pg_conf.

  • log_lock_waits | boolean

    DEPRECATED. Use extra_pg_conf.

  • log_min_duration_statement | int

    Default: -1

    DEPRECATED. Use extra_pg_conf.

  • log_temp_files | string

    Default: -1

    DEPRECATED. Use extra_pg_conf.

  • log_timezone | string

    Default: UTC

    DEPRECATED. Use extra_pg_conf.

  • maintenance_work_mem | string

    Default: 1MB

    DEPRECATED. Use extra_pg_conf.

  • manual_replication | boolean

    Enable or disable charm managed replication. When manual_replication is True, the operator is responsible for maintaining recovery.conf and performing any necessary database mirroring. The charm will still advertise the unit as standalone, master or hot standby to relations based on whether the system is in recovery mode or not. Note that this option makes it possible to create a PostgreSQL service with multiple master units, which is a very silly thing to do unless you are also using multi-master software like BDR.

  • manual_replication_active_units | string

    If set, a comma-separated list of unit names that are fully manually replicated and ready for the charm to start handling. If unset, all units are assumed to be ready to go. Ignored if manual_replication is not set.

  • max_connections | int

    Default: 100

    DEPRECATED. Use extra_pg_conf.

  • max_prepared_transactions | int

    DEPRECATED. Use extra_pg_conf.

  • max_wal_senders | int

    DEPRECATED. Use extra_pg_conf.

  • metrics_prefix | string

    Default: dev.$UNIT.postgresql

    Prefix for metrics. Special value $UNIT can be used to include the name of the unit in the prefix.

  • metrics_sample_interval | int

    Default: 5

    Period for metrics cron job to run in minutes

  • metrics_target | string

    Destination for statsd-format metrics, format "host:port". If not present and valid, metrics disabled.

  • nagios_context | string

    Default: juju

    Used by the nrpe subordinate charms. A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: juju-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.

  • nagios_servicegroups | string

    A comma-separated list of nagios servicegroups. If left empty, the nagios_context will be used as the servicegroup

  • os_auth_url | string

    OpenStack Swift authentication URL.

  • os_identity_api_version | string

    OpenStack authentication protocol version.

  • os_password | string

    OpenStack Swift password.

  • os_project_domain_name | string

    OpenStack Swift domain name or ID containing project.

  • os_project_name | string

    OpenStack Swift project name.

  • os_region_name | string

    OpenStack Swift authentication region name.

  • os_tenant_name | string

    OpenStack Swift tenant name.

  • os_user_domain_name | string

    OpenStack Swift domain name or ID containing user.

  • os_username | string

    OpenStack Swift username.

  • package_status | string

    Default: install

    The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".

  • performance_tuning | string

    Default: Mixed

    DEPRECATED AND IGNORED. The pgtune project has been abandoned and the packages dropped from Debian and Ubuntu. The charm still performs some basic tuning, which users can tweak using extra_pg_config.

  • pgdg | boolean

    Enable the PostgreSQL Global Development Group APT repository (https://wiki.postgresql.org/wiki/Apt). This package source provides official PostgreSQL packages for Ubuntu LTS releases beyond those provided by the main Ubuntu archive.

  • random_page_cost | float

    Default: 4.0

    DEPRECATED. Use extra_pg_conf.

  • relation_database_privileges | string

    Default: ALL

    A comma-separated list of database privileges to grant to relation users on their databases. The defaults allow to connect to the database (CONNECT), create objects such as tables (CREATE), and create temporary tables (TEMPORARY). Client charms that create objects in the database are responsible to granting suitable access on those objects to other roles and users (or PUBLIC) using standard GRANT statements.

  • replicated_wal_keep_segments | int

    Default: 500

    DEPRECATED. Use extra_pg_conf.

  • search_path | string

    Default: "$user",public

    DEPRECATED. Use extra_pg_conf.

  • shared_buffers | string

    DEPRECATED. Use extra_pg_conf.

  • snapd_refresh | string

    How often snapd handles updates for installed snaps. The default (an empty string) is 4x per day. Set to "max" to check once per month based on the charm deployment date. You may also set a custom string as described in the 'refresh.timer' section here: https://forum.snapcraft.io/t/system-options/87

  • ssl | string

    Default: True

    DEPRECATED. Use extra_pg_conf.

  • standard_conforming_strings | boolean

    Default: True

    DEPRECATED. Use extra_pg_conf.

  • streaming_replication | boolean

    Default: True

    Enable streaming replication. Normally, streaming replication is always used, and any log shipping configured is used as a fallback. Turning this off without configuring log shipping is an error.

  • synchronous_commit | boolean

    Default: True

    DEPRECATED. Use extra_pg_conf.

  • temp_buffers | string

    Default: 1MB

    DEPRECATED. Use extra_pg_conf.

  • version | string

    Version of PostgreSQL that we want to install. Supported versions are "9.5", "9.6", "10", "11", "12" and "14". The default version for the deployed Ubuntu release is used when the version is unspecified.

  • wabs_access_key | string

    EXPERIMENTAL. Windows Azure access key.

  • wabs_account_name | string

    EXPERIMENTAL. Windows Azure account name.

  • wal_archive_crit_threshold | int

    Default: 600

    How many seconds the oldest un-uploaded WAL database backup can be before the Nagios check will issue a critical error.

  • wal_archive_warn_threshold | int

    Default: 300

    How many seconds the oldest un-uploaded WAL database backup can be before the Nagios check will issue a warning.

  • wal_buffers | string

    Default: -1

    DEPRECATED. Use extra_pg_conf.

  • wal_e_backup_retention | int

    Default: 2

    Number of recent base backups and WAL files to retain. You need enough space for this many backups plus one more, as an old backup will only be removed after a new one has been successfully made to replace it.

  • wal_e_backup_schedule | string

    Default: 13 0 * * *

    Cron-formatted schedule for WAL-E database backups. If wal_e_backup_schedule is unset, WAL files will never be removed from WAL-E storage.

  • wal_e_storage_uri | string

    Specify storage to be used by WAL-E. Every PostgreSQL service must use a unique URI. Backups will be unrecoverable if it is not unique. The URI's scheme must be one of 'swift' (OpenStack Swift), 's3' (Amazon AWS), 'wabs' (Windows Azure) or a local folder. For example: 'swift://some-container/directory/or/whatever' 's3://some-bucket/directory/or/whatever' 'wabs://some-bucket/directory/or/whatever' 'file://localhost/backups/pg' Setting the wal_e_storage_uri enables regular WAL-E filesystem level backups (per wal_e_backup_schedule), and log shipping to the configured storage. Point-in-time recovery becomes possible, as is disabling the streaming_replication configuration item and relying solely on log shipping for replication.

  • wal_keep_segments | int

    DEPRECATED. Use extra_pg_conf.

  • wal_level | string

    Default: minimal

    DEPRECATED. Use extra_pg_conf.

  • work_mem | string

    Default: 1MB

    DEPRECATED. Use extra_pg_conf.