<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Lazy Sys Admin&#187; pg_standby</title>
	<atom:link href="http://www.thelazysysadmin.net/tag/pg_standby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thelazysysadmin.net</link>
	<description>Why do things the hard way?</description>
	<lastBuildDate>Mon, 07 Jun 2010 22:24:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>pg_standby triggering unexpectedly</title>
		<link>http://www.thelazysysadmin.net/2009/08/pg_standby-triggering-unexpectedly/</link>
		<comments>http://www.thelazysysadmin.net/2009/08/pg_standby-triggering-unexpectedly/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 05:57:10 +0000</pubDate>
		<dc:creator>Jon Smith</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[Log Shipping]]></category>
		<category><![CDATA[pg_standby]]></category>
		<category><![CDATA[RSync]]></category>
		<category><![CDATA[WAL Logging]]></category>

		<guid isPermaLink="false">http://www.thelazysysadmin.net/?p=629</guid>
		<description><![CDATA[I have been having a problem with my redundant PostgreSQL setup over the last couple of weeks. I run two Postgres servers with a WAL Logging Warm Standby system using pg_standby from 8.3. When the master server is under heavy load and generating a lot of WAL traffic the secondary server has been tripping and [...]]]></description>
			<content:encoded><![CDATA[<p>I have been having a problem with my redundant PostgreSQL setup over the last couple of weeks. I run two Postgres servers with a WAL Logging Warm Standby system using pg_standby from 8.3. When the master server is under heavy load and generating a lot of WAL traffic the secondary server has been tripping and going active.</p>
<p>After checking all the logs and putting pg_standby in debug mode there was still no clue as to why this was happening.</p>
<p><span id="more-629"></span>The archive_command on my master server was using</p>
<pre class="brush: plain;">cp -i &quot;%p&quot; /var/lib/pgsql/slave/pg_logrestore/&quot;%f&quot;</pre>
<p>I have read somewhere (I can&#8217;t remember where or when) that when you use cp to copy the WAL log the file appears in the destination without it being a complete copy so this got me to wondering if this was causing my problem. Knowing that RSync will use a temp file when copying and then rename the file once completed I thought I would give that a go.</p>
<p>My new archive_command is</p>
<pre class="brush: plain;">rsync -q &quot;%p&quot; /var/lib/pgsql/slave/pg_logrestore/&quot;%f&quot;</pre>
<p>Since making this change the standby server hasn&#8217;t triggered without reason and the problem appears to be fixed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thelazysysadmin.net/2009/08/pg_standby-triggering-unexpectedly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
