i'm setting up multiple instances of postgres 9.3 on the same machine (centos 7). I have 2 virtual ip addresses, one instance is bound to first address and second is bound to second one. Same configuration is working on postgres 8.4 and very old red hat server.

I have configured 2 .service files in /usr/lib/systemd/system and i have done the setup initdb servicename commands.

the problem is: if i starts first service it goes well, but the second says that /tmp/.s.PGSQL.5432.lock file already exists.

in previuos db and os version i could set two different /var/run path in order to manage two instances,but now i cannot do it beacause i don't find any setting to write lock file where i want.

obviously if i change listening port on second instance all works well beacuse it create another lock file with different name,but i would to mantian same configuration. I don't know if in new version they delete the possibility to have 2 instances on same port and different ips but it seems strange to me.

how can i do?



You must also set separate unix_socket_directories.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.