Re: Centos Hot-Standby, different Startup behavior between systemctl & pg_ctl start.

From: <kurt(at)thepw(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Centos Hot-Standby, different Startup behavior between systemctl & pg_ctl start.
Date: 2015-12-31 20:34:29
Message-ID: 20151231133429.02ba4c4c55b8355eb9c1d44e33aacdec.f8861aaa7a.wbe@email15.secureserver.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<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 &amp; pg_ctl start.<br>
From: &lt;<a href="mailto:kurt(at)thepw(dot)com">kurt(at)thepw(dot)com</a>&gt;<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>&nbsp;&nbsp;&nbsp;&nbsp; I am running postgresql on Centos 7.2, using postgresql from the standard Centos repository, which provides postgresql.</div><div><br></div><div>&nbsp;&nbsp;&nbsp;&nbsp; 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:&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp; 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>

Attachment Content-Type Size
unknown_filename text/html 2.6 KB

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Wood 2016-01-02 10:39:06 Re: Centos Hot-Standby, different Startup behavior between systemctl & pg_ctl start.
Previous Message kurt 2015-12-31 20:30:22 Centos Hot-Standby, different Startup behavior between systemctl & pg_ctl start.