I fixed this by doing brew services stop postgresql -- I was doing this on Mac.
I could then start as usual, using either homebrew or manually.
My guess is that pg_ctl -D /usr/local/var/postgres and brew services start create different record files, and you need to start the same way you start.
you need to check your java status
if you don't see java-17
then first install
pacman -Syu jre-openjdk
and then set java-17 as default
archlinux-java set java-17-openjdk