la procédure que j'avais posté est à revoir
je ne là supprime pas car elle fonctionne postgresql <11
Installation
sudo pacman -S postgresql postgresql-docssudo pacman -S pgadmin4******
installation dans un répertoire distinct de la racine système
pensez si crash
sudo mkdir /home/pgsql
sudo mkdir /home/pgsql/dataautorisation
sudo chown -R postgres:postgres /home/pgsqlsudo systemctl stop postgresqlmodifier les variables pour dire ou se trouve la data-base
et donnez l'autorisation pour HOME sinon vous aurez une interdiction (permission) voir plus s'il y a lieu
sudo mousepad /usr/lib/systemd/system/postgresql.service#Environment=PGROOT=/var/lib/postgres
Environment=PGROOT=/home/pgsql
# PIDFile=/var/lib/postgres/data/postmaster.pid
PIDFile=/home/pgsql/data/postmaster.pid
#ProtectHome=true
ProtectHome=false
sudo -i -u postgresinitdb --locale fr_FR.UTF-8 -D '/home/pgsql/data'ctrl + d
on réinitialise le daemon
sudo systemctl daemon-reloadsudo systemctl start postgresqlsystemctl status postgresql.servicesudo -i -u postgrespsql\password postgresctrl + d
---------- démarrage automatique
systemctl enable postgresqlsystemctl disable postgresql