Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am using PostgreSQL 8.4 on Ubuntu LTS 10.04.02 server version. I use pg_standby to restore the data and for database recovery created a recovery.conf and placed it on /etc/postgresql/8.4/main where rest of conf files present and tried to start the DB using

sudo service postgresql start

expecting the service to recognize that I am doing a recovery using recovery.conf. I found this file was ignored. Then, I had to copy all *.conf file to my data directory (in my case /dbdata/data) and then, instead of using script from init.d, I had to start the database from 'postgres' user with

/usr/lib/postgresql/8.4/bin/pg_ctl -D /dbdata/proddata  -l /var/log/postgresql/postgresql-8.4-main.log start

How I can make my recovery procedure to obey /etc/init.d/postgresql start|stop|restart or to have pg_ctl command to look for conf files /etc/postgresql/8.4/main ?

Note : I am relatively newbie to PostgreSQL and to database administration in general

share|improve this question

migrated from askubuntu.com Jun 20 '11 at 12:45

This question came from our site for Ubuntu users and developers.

1 Answer 1

up vote 3 down vote accepted

The recovery.conf file needs to go into the data directory (/var/lib/postgresql/...). The other configuration files can stay where they are (/etc/postgresql/...). Then a normal restart should do what you want.

share|improve this answer
    
I am yet to validate it. but accepting the answer as it looks correct and I will be taking few days to validate them. Thanks Peter. –  Jamess Jun 22 '11 at 8:30
    
It does not seem to look at /etc/postgresql/..., I had to keep postgresql.conf also in data directory. Probably this is specific to Ubuntu. –  Jamess Aug 9 '11 at 5:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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