Service postgresql is dead after Debian 11 upgrade

My YunoHost server

Hardware: OVH VPS
YunoHost version:

yunohost:
  repo: stable
  version: 11.0.10.2
yunohost-admin:
  repo: stable
  version: 11.0.11
moulinette:
  repo: stable
  version: 11.0.9
ssowat:
  repo: stable
  version: 11.0.9

I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Hi all,

Since the Debian/Ynh 11 upgrade I have en error in the diagnosis tool:

13:
        details: You can try to restart the service, and if it doesn't work, have a look at the service logs in the webadmin (from the command line, you can do this with 'yunohost service restart postgresql' and 'yunohost service log postgresql').
        status: ERROR
        summary: Service postgresql is dead :(

But my postgresql seems to works well:

$ sudo yunohost service status postgresql
configuration: unknown
description: Stores app data (SQL database)
last_state_change: 1970-01-01 00:00:00
start_on_boot: enabled
status: dead
$ sudo service postgresql status
● postgresql.service - PostgreSQL RDBMS
     Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
     Active: active (exited) since Wed 2023-01-04 16:08:52 UTC; 3 weeks 4 days ago
   Main PID: 144248 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 9299)
     Memory: 0B
        CPU: 0
     CGroup: /system.slice/postgresql.service

Jan 04 16:08:52 systemd[1]: Starting PostgreSQL RDBMS...
Jan 04 16:08:52 systemd[1]: Finished PostgreSQL RDBMS.
$ sudo apt remove postgresql-13 --dry-run
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  adwaita-icon-theme alsa-topology-conf alsa-ucm-conf at-spi2-core dconf-gsettings-backend dconf-service erlang-asn1
  erlang-base erlang-crypto erlang-eldap erlang-ftp erlang-inets erlang-mnesia erlang-os-mon erlang-parsetools
  erlang-public-key erlang-runtime-tools erlang-snmp erlang-ssl erlang-syntax-tools erlang-tftp erlang-tools erlang-xmerl
  gconf-service gconf2-common glib-networking glib-networking-common glib-networking-services gsettings-desktop-schemas
  gtk-update-icon-cache libasound2 libasound2-data libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0
  libcairo-gobject2 libcolord2 libcurl3-nss libcurl4-nss-dev libdbus-glib-1-2 libdconf1 libdrm-amdgpu1 libdrm-common
  libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libepoxy0 libgconf-2-4 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-bin
  libgdk-pixbuf2.0-common libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libgtk-3-0 libgtk-3-bin
  libgtk-3-common libice6 libjson-glib-1.0-0 libjson-glib-1.0-common libllvm11 libnspr4 libnss3 libpciaccess0 libproxy1v5
  librest-0.7-0 librsvg2-2 librsvg2-common libsctp1 libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libvulkan1 libwayland-client0
  libwayland-cursor0 libwayland-egl1 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
  libxcb-randr0 libxcb-sync1 libxcb-xfixes0 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxfont2 libxi6
  libxinerama1 libxkbcommon0 libxkbfile1 libxmu6 libxrandr2 libxshmfence1 libxss1 libxt6 libxtst6 libxxf86vm1 libz3-4
  mariadb-client mesa-vulkan-drivers onlyoffice-documentserver postgresql-client pwgen rabbitmq-server supervisor
  x11-xkb-utils xfonts-base xkb-data xserver-common xvfb
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  onlyoffice-ynh-deps postgresql postgresql-13 postgresql-contrib
0 upgraded, 0 newly installed, 4 to remove and 49 not upgraded.
Remv onlyoffice-ynh-deps [7.1.0~ynh1]
Remv postgresql [13+225]
Remv postgresql-contrib [13+225]
Remv postgresql-13 [13.9-0+deb11u1]

I guess that Yunohost service point to the wrong postgresql version, but I don’t know how to fix this.

Thank you for the help!

hmokay let’s look at systemctl status postgresql@13-main

$ sudo systemctl status postgresql@13-main
● postgresql@13-main.service - PostgreSQL Cluster 13-main
     Loaded: loaded (/lib/systemd/system/postgresql@.service; enabled-runtime; vendor preset: enabled)
     Active: active (running) since Wed 2023-01-04 16:08:52 UTC; 3 weeks 4 days ago
   Main PID: 144228 (postgres)
      Tasks: 7 (limit: 9299)
     Memory: 32.2M
        CPU: 24min 10.311s
     CGroup: /system.slice/system-postgresql.slice/postgresql@13-main.service
             ├─144228 /usr/lib/postgresql/13/bin/postgres -D /var/lib/postgresql/13/main -c config_file=/etc/postgr>
             ├─144230 postgres: 13/main: checkpointer
             ├─144231 postgres: 13/main: background writer
             ├─144232 postgres: 13/main: walwriter
             ├─144233 postgres: 13/main: autovacuum launcher
             ├─144234 postgres: 13/main: stats collector
             └─144235 postgres: 13/main: logical replication launcher

Jan 04 16:08:50 systemd[1]: Starting PostgreSQL Cluster 13-main...
Jan 04 16:08:52 systemd[1]: Started PostgreSQL Cluster 13-main.

up :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.