<html><body><span style="font-family:Verdana; color:#000; font-size:10pt;"><div><br></div><div>Hello,</div><div> I am running postgresql on Centos 7.2, using postgresql from the standard Centos repository, which provides postgresql.</div><div><br></div><div> My goal is to run a Master and a hot-standby server via WAL-file archiving, and the standby machine seems to be working prop[erly as long as I start postgresql on it via pg_ctl on the command line as the postgres user. The logs in pg_log collect lots of messages like:</div><div><br></div><div>"cp: cannot stat ‘/var/backup/WALarchive/0000000100000006000000FD’: No such file or directory"</div><div><br></div><div>but eventually i see a line like:</div><div><br></div><div>"LOG: restored log file "0000000100000006000000FD" from archive"</div><div><br></div><div>and then it starts complaining about the next WAL file. Verbose, but I guess it's working.</div><div><br></div><div> I got the pg_ctl command line right out of the postgresql.service file for systemd. The systemctl utility must be running the same command when I say "systemctl start postgres". But when I try to start postgresql that way, I see different (and not in a good way) results. Instead of the above I see log file lines like:</div><div><br></div><div>"cp: cannot stat ‘/var/backup/WALarchive/0000000100000006000000ED’: Permission denied"</div><div><br></div><div>And it never seems to advance to the next WAL file.</div><div><br></div><div>Any advice would be appreciated. I'd like to be able to use systemd, that's how the database will run on startup.</div><div><br></div><div>Yours,</div><div><br></div><div>Kurt Reimer</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></span></body></html>