Initial recovery Postgres with backup in sync commit mode I've got a master and a slave postgres 9.1.3 database. I would like to init the backup database for the first time.

I did the following steps:


Stopped master
Copied all files to Slave
Create recory.conf on slave
started master
started slave


This process seems to work, but I've got the feeling something is wrong, because it's been a few hours now and there are still postgres: wal receiver process   streaming 1/1FAA88 and postgres: startup process   recovering 000000010000000100000000 processes on the slave.

The slave should be up after a few seconds because it already consists of all needed data...

I don't archive my WALs.

Do I have to use pg_start_backup before copying the files to the slave?

I tried this:


Disable sync commits
restart master
master pg_start_backup
stop master
copy files
start master
master pg_stop_backup (docs say "don't do that when sync commit = on", I guessed the master resends all files in pg_xlog when it starts?)
Enable sync commit
restart master
create recovery file on slave
start slave


But then I get an error on he slave about some missing WALs.

I found alot of tutorials with using WAL archive, but I don't have a WAL archive.

Can anyone give me the correct steps?
If you don't archive wal's then how do you suppose the slave is going to get them?

You have to archive, and then recovery.conf should read from the archive.