I setup a two node postgresql 10 cluster to test replication. Following this guide

I was able to get replication running correctly. However, I want to test the process of the slave to master. When I stop the master node, and run pg_ctl promote -D on the slave, I get:

pg_ctl: server did not promote in time

I've looked online and can't find anything related to being unable to promote in time. After running the command and receiving the error, I have to manually start postgresql and it is still running in a read only state.

Postgresql is running on Ubuntu 18.04.


To promote, pg_ctl writes a file called $PGDATA/promote, sends SIGUSR1, then waits a default of 60 seconds for the server to acknowledge that it is now read-write. Does that file exist? What is in the server log file?

  • 1
    Turns out the recovery.conf was owned by root and the postgres user couldn't open the file. Thank you for pointing out the log, I should have thought of that earlier.
    – SQLMac
    Jun 12 '18 at 17:46

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.