0

i on artix with runit postgresql have issues after starting

#sudo sv start postgresql
ok: run: postgresql: (pid 849) 1236s
#sudo -u postgres psql
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
#sudo sv status postgresql
down: postgresql: 0s, normally up, want up; run: log: (pid 854) 1273s

primarily its starting, then after i check its status its prompting me that the service is down

sudo sv start postgresql
ok: run: postgresql: (pid 11583) 0s
sudo sv status postgresql
down: postgresql: 0s, normally up, want up; run: log: (pid 854) 59


/var/log/postgresql/@400000006611a7623ac93f6c.u
2024-04-06_19:09:52.09176 postgres: could not access the server configuration file "/var/lib/postgres/data/postgresql.conf": No such file or directory

when i start it manualy :

➜  postgresql sudo ./run
2024-04-07 21:21:42.964 GMT [19108] LOG:  skipping missing configuration file "/var/lib/postgres/data/postgresql.auto.conf"
2024-04-07 21:21:42.964 GMT [19108] FATAL:  "/var/lib/postgres/data" is not a valid data directory
2024-04-07 21:21:42.964 GMT [19108] DETAIL:  File "/var/lib/postgres/data/PG_VERSION" is missing.
2
  • The error message says that PostgreSQL server isn't running. Did it start after you attempted to start it? If not, what happened including error messages? What is in the logs. Add that information to the question instead of posting it in the comments. Commented Apr 7, 2024 at 20:33
  • 1
    Is that # a the beginning of the first line intended to show you're root, or that the entire line is a comment? Commented Apr 7, 2024 at 21:17

1 Answer 1

0

fixed it with

#FATAL: "/var/lib/postgres/data" is not a valid data directory
rm /var/lib/postgres/data
sv start postgresql

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.