<html><body><span style="font-family:Verdana; color:#000; font-size:10pt;"><div><br></div><div>Sorry, I neglected to include the postgresql version below. It's 9.2.14, from the regular Centos yum repositories..<br></div>
<blockquote id="replyBlockquote" webmail="1" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px; font-size:10pt; color:black; font-family:verdana;">
<div id="wmQuoteWrapper">
-------- Original Message --------<br>
Subject: [NOVICE] Centos Hot-Standby, different Startup behavior between<br>
systemctl & pg_ctl start.<br>
From: <<a href="mailto:kurt(at)thepw(dot)com">kurt(at)thepw(dot)com</a>><br>
Date: Thu, December 31, 2015 3:30 pm<br>
To: <a href="mailto:pgsql-novice(at)postgresql(dot)org">pgsql-novice(at)postgresql(dot)org</a><br>
<br>
<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>
</div>
</blockquote></span></body></html>