File size is identical, /var/lib one is as you say postgres:postgres 100644, but /opt/rockstor is root:root and 100644
PG version shows 17 and directory listing permissions are identical as yours, only thing is that ls or cat /var/lib/pgsql/data works only as root (viewing). Not sure it means anything.
100600 to be correct, not that it probably matters… what are my options ? Can I (temporary) downgrade to rockstor 5.1.0 and postgresql13 ? Or use somehow (snapshot ?) features of btrfs (I have root also btfrs) ?
Can you also check whether the files below the ./pg_wal directory have postgres as the owner (I assume they do)?
I am not sure about the downgrading back to 5.1.0 without a clean install, as db migrations have likely already occurred (like adding a new field, etc.) initiated by Django, which would complicate things.
You have not performed a Rockstor configuration backup recently, correct? Otherwise, it would be easiest to just reinstall and apply the configuration back after importing your data pool(s) following the Rockstor documentation.
I tried to convert database back from 17 → 13 and it kind of worked (means PostgreSQL13 service is working). Now how to do rockstor 5.5 to 5.1 (to test does it really work) ?
Is the database accessible with the username/password (like with the above mentioned example)?
In general, you can ask zypper to install a specific version (and possibly even force it), though I am not sure about the implications, if you still have remaining items from 5.5 sitting around. I suspect, you would have to still perform the directory removal as @phillxnet mentioned.
But I certainly have not tried this, so YMMV.
I finally gave up and started again. I uninstalled postgresql17, which then uninstalled many things including. python311 and rockstor package (it was intentional). Then installed rockstor package again, but after restart:
× rockstor-build.service - Build Rockstor
Loaded: loaded (/usr/lib/systemd/system/rockstor-build.service; disabled; preset: disabled)
Active: failed (Result: exit-code) since Sat 2026-05-16 23:07:20 EEST; 5min ago
Invocation: 5940110796704131aef82fefac2fdf52
Process: 1381 ExecStart=/opt/rockstor/build.sh (code=exited, status=1/FAILURE)
Main PID: 1381 (code=exited, status=1/FAILURE)
CPU: 41.273s
May 16 23:05:50 server build.sh[1614]: injected package poetry-plugin-dotenv into venv poetry
May 16 23:05:51 server build.sh[1627]: venvs are in /opt/pipx/venvs
May 16 23:05:51 server build.sh[1627]: apps are exposed on your $PATH at /usr/local/bin
May 16 23:05:51 server build.sh[1627]: manual pages are exposed at /usr/local/share/man
May 16 23:05:51 server build.sh[1627]: package poetry 2.3.4, installed using Python 3.13.13
May 16 23:05:51 server build.sh[1627]: - poetry
May 16 23:07:20 server systemd[1]: rockstor-build.service: Main process exited, code=exited, status=1/FAILURE
May 16 23:07:20 server systemd[1]: rockstor-build.service: Failed with result ‘exit-code’.
May 16 23:07:20 server systemd[1]: Failed to start Build Rockstor.
May 16 23:07:20 server systemd[1]: rockstor-build.service: Consumed 41.273s CPU time over 1min 47.227s wall clock.
does the /opt/rockstor/var/log/rockstor.log show any more detailed messages (or journalctl -u rockstor-build) on what’s is going wrong with the build.sh the service tries to execute? At least, it seems the dependencies are fulfilled correctly, since it starts executing: