postgresql

Charmed PostgreSQL VM

Channel Revision Published Runs on
latest/stable 591 Yesterday
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 553 04 Feb 2025
Ubuntu 22.04
14/stable 552 04 Feb 2025
Ubuntu 22.04
14/candidate 553 28 Jan 2025
Ubuntu 22.04
14/candidate 552 28 Jan 2025
Ubuntu 22.04
14/beta 553 28 Jan 2025
Ubuntu 22.04
14/beta 552 28 Jan 2025
Ubuntu 22.04
14/edge 590 29 Mar 2025
Ubuntu 22.04
14/edge 589 29 Mar 2025
Ubuntu 22.04
16/beta 577 19 Mar 2025
Ubuntu 24.04
16/beta 578 19 Mar 2025
Ubuntu 24.04
16/edge 584 26 Mar 2025
Ubuntu 24.04
16/edge 583 26 Mar 2025
Ubuntu 24.04
juju deploy postgresql --channel 16/edge
Show information

Platform:

Ubuntu
24.04 22.04 20.04 18.04 16.04 14.04

SoS report

SoS is an extensible, portable, support data collection tool primarily aimed at Linux distributions and other UNIX-like operating systems.

You can use the built-in version of SoS, or retrieve the latest version from GitHub.

Always review the collected data before sharing it!

The generated archive may contain sensitive data. Its content should be reviewed by the originating organization before being passed to any third party.

Use built-in SoS (recommended)

Charmed PostgreSQL shipped with built-in SoS reporting tool. You can use it to collect logs on a specific unit or multiple units at once.

Collect logs on one unit

To generate the troubleshooting report archiving all logs simply call sos report inside the relevant Juju unit:

juju ssh postgresql/0
> sudo sos report -o system,systemd,snap,charmed_postgresql --low-priority

As a result, the archive will all logs will be generated and can be shared with your support representative:

...
Your sos report has been generated and saved in:
	/tmp/sosreport-juju-d4c067-1-2025-04-07-chdmwlz.tar.xz

 Size	216.36KiB
 Owner	root
 sha256	b3bf2c54bb3d934ca61ab2a17c19e98b2abeafd45589f268b62bd02f6b2a4c5f
...

Use juju scp to copy logs from Juju unit to localhost:

juju scp postgresql/0:/tmp/sosreport-juju-d4c067-1-2025-04-07-chdmwlz.tar.xz .
Example output
juju ssh postgresql/0

ubuntu@juju-d4c067-1:~$ sudo sos report -o system,systemd,snap,charmed_postgresql --low-priority

sos report (version 4.8.2)

This command will collect system configuration and diagnostic
information from this Ubuntu system.

For more information on Canonical visit:

        Community Website  : https://www.ubuntu.com/
        Commercial Support : https://www.canonical.com

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.


Press ENTER to continue, or CTRL-C to quit.

Optionally, please enter the case id that you are generating this report for []: 

 Setting up archive ...
 Setting up plugins ...
 Running plugins. Please wait ...

  Starting 4/4   systemd         [Running: charmed_postgresql system snap systemd]
  Finishing plugins              [Running: charmed_postgresql]                            
  Finished running plugins                                                               
Creating compressed archive...

Your sos report has been generated and saved in:
	/tmp/sosreport-juju-d4c067-1-2025-04-07-qntyqpz.tar.xz

 Size	285.60KiB
 Owner	root
 sha256	d318d7de7595ebae1bce093a375129fafbd397c297317de3006fbfe45e93d43d

Please send this file to your support representative.

ubuntu@juju-d4c067-1:~$ exit

juju scp postgresql/0:/tmp/sosreport-juju-d4c067-1-2025-04-07-qntyqpz.tar.xz .

Collect logs from several units

The sos tool allows you to collect logs from several Juju units (replace <UNIT_A/B/…> labels with proper Juju unit like postgresql/0).

Run the following command from outside the Juju units:

sos collect --cluster-type juju --no-local -c "juju.units=<UNIT_A>,<UNIT_B>,<...>" --batch -o system,systemd,snap,charmed_postgresql --low-priority

Use the latest sos plugins from Git

The latest version of sos plugins can be retrieved from Git easily:

git clone https://github.com/sosreport/sos.git
cd sos
sudo ./bin/sos report -­a

The output will be the same to the example above providing archive with all logs as above:

Your sos report has been generated and saved in:
	/tmp/sosreport-juju-d4c067-1-2025-04-07-egosqmi.tar.xz