Hi,
I'm running Postgresql 9.2 on SLES 11 (Suse Enterprise). I want to use the archived WALs for a PITR Backup and a Hot Standy server. So I did a file-system based backup and let the main server archive all its WALs in an extra archive. This is working fine. Now i want to restore the backup to use it for a Hot Standby Server. I got following configurations:
main server:
wal_level = hot_standby
archive_mode = on
archive_command = 'cp ........'
standby:
wal_level = hot_standby
hot_standby = on
recovery.conf on standby:
restore_command = '/path/archive/%f %p'
standby_mode = on
Now i can''t start the standby and receive following message in the logs:
2014-03-13 13:16:47 UTC LOG: database system was interrupted; last known up at 2014-03-12 17:26:50 UTC
2014-03-13 13:16:47 UTC LOG: entering standby mode
sh: /pgsql-replication/archive/00000001000001FE00000052: Permission denied
2014-03-13 13:16:47 UTC FATAL: could not restore file "00000001000001FE00000052" from archive: return code 32256
2014-03-13 13:16:47 UTC LOG: startup process (PID 16806) exited with exit code 1
2014-03-13 13:16:47 UTC LOG: aborting startup due to startup process failure
2014-03-13 13:16:47 UTC LOG: database system was interrupted; last known up at 2014-03-12 17:26:50 UTC
2014-03-13 13:16:47 UTC LOG: entering standby mode
sh: /pgsql-replication/archive/00000001000001FE00000052: Permission denied
2014-03-13 13:16:47 UTC FATAL: could not restore file "00000001000001FE00000052" from archive: return code 32256
2014-03-13 13:16:47 UTC LOG: startup process (PID 16806) exited with exit code 1
2014-03-13 13:16:47 UTC LOG: aborting startup due to startup process failure
I checked the path and the permissions for postgres to write and read in the directory where the wals are written in. It should work. I could copy the file-backup a postgres user from a directory with the same permissions.
1.Is there something I missed?
2. Do I need to use archive_mode = on and archive_command on the Hot Standby too?
Thanks for any help or suggestions,
Gaby