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: Centos Hot-Standby, different Startup behavior between systemctl & pg_ctl start.
Date: 2015-12-31 20:30:22
Message-ID: 20151231133022.02ba4c4c55b8355eb9c1d44e33aacdec.3ed8ce9671.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>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></body></html>

Attachment Content-Type Size
unknown_filename text/html 1.8 KB

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message kurt 2015-12-31 20:34:29 Re: Centos Hot-Standby, different Startup behavior between systemctl & pg_ctl start.
Previous Message john moyard 2015-12-24 14:35:50 [ecpg & void type] problem