Hello,
Requirements:
I have Searched the forum for my issue and found nothing related or helpful
I have checked the Resources category (Resources Index)
I have reviewed the Wiki for relevant information
I have read the the Release Notes and Errata
OpenMandriva Lx version:
OpenMandriva Lx release 26.02 (ROME) Rolling for x86_64
Desktop environment (KDE, LXQT…):
sway
Description of the issue (screenshots if relevant):
“systemctl start postgresql” results into error:
Relevant informations (hardware involved, software version, logs or output…):
[~ ] $ sudo systemctl start postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xeu postgresql.service" for details.
[~ ] $ sudo journalctl -xeu postgresql
Mar 09 21:31:59 openmandriva-x8664 postgresql_initdb.sh[12940]: /usr/libexec/postgresql_initdb.sh: line 1>
Mar 09 21:31:59 openmandriva-x8664 postgresql_initdb.sh[12946]: ls: cannot access '/srv/pgsql/update-from>
Mar 09 21:31:59 openmandriva-x8664 systemd[1]: postgresql.service: Control process exited, code=exited, s>
I tried looking into /usr/libexec/postgresql_initdb.sh
And my guess is this script’s detection whether we are updating is incorrect:
# Check if we're updating
MAJORVERSION="$(postgres --version |cut -d' ' -f3 |cut -d. -f1)"
UPDIR="$(ls -1d /srv/pgsql/update-from-*-to-${MAJORVERSION} |head -n1 2>/dev/null)"
if [ -d "$UPDIR" ]; then
OLDMAJOR=$(echo $UPDIR |sed -e 's,.*update-from-,,;s,-.*,,')
echo "Resuming update from ${OLDMAJOR} to ${MAJORVERSION}"
cp -af /srv/pgsql/data-from-${OLDMAJOR}/*.{conf,opts} "${PGDATA}"
pg_ctl start -D ${PGDATA} -s -o "-p 5432" -w -t 300
psql -f ${UPDIR}/db.dump postgres &>${UPDIR}/restore.log
vacuumdb -a -z &>${UPDIR}/vacuumdb.log
pg_ctl stop -D "${PGDATA}"
cat >&2 <<EOF