<?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/"
		xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>tending the garden &#187; q&amp;a</title>
	<atom:link href="http://www.chesnok.com/daily/tag/qa/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chesnok.com/daily</link>
	<description>Selena Deckelmann&#039;s blog about postgres, open source and the web.</description>
	<lastBuildDate>Tue, 07 Feb 2012 18:11:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<copyright>2006-2007 </copyright>
	<managingEditor>selenamarie@gmail.com (tending the garden)</managingEditor>
	<webMaster>selenamarie@gmail.com (tending the garden)</webMaster>
	<image>
		<url>http://www.chesnok.com/daily/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
		<title>tending the garden</title>
		<link>http://www.chesnok.com/daily</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>a gathering place for all the stray thoughts</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Society &#38; Culture" />
	<itunes:author>tending the garden</itunes:author>
	<itunes:owner>
		<itunes:name>tending the garden</itunes:name>
		<itunes:email>selenamarie@gmail.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://www.chesnok.com/daily/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<item>
		<title>Q&amp;A about Hot Standby</title>
		<link>http://www.chesnok.com/daily/2010/07/12/qa-about-hot-standby/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=qa-about-hot-standby</link>
		<comments>http://www.chesnok.com/daily/2010/07/12/qa-about-hot-standby/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 04:17:16 +0000</pubDate>
		<dc:creator>selena</dc:creator>
				<category><![CDATA[postgresql]]></category>
		<category><![CDATA[9.0]]></category>
		<category><![CDATA[hot standby]]></category>
		<category><![CDATA[q&a]]></category>
		<category><![CDATA[quickstart]]></category>

		<guid isPermaLink="false">http://www.chesnok.com/daily/?p=1813</guid>
		<description><![CDATA[TweetUpdated!: See below. Here are some questions that came up from trying to use the current PostgreSQL hot standby documentation: Q: If you set hot_standby = off after having it on, what happens? A: This change requires a database restart &#8230; <a href="http://www.chesnok.com/daily/2010/07/12/qa-about-hot-standby/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton1813" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.chesnok.com%2Fdaily%2F2010%2F07%2F12%2Fqa-about-hot-standby%2F&amp;text=Q%26%23038%3BA%20about%20Hot%20Standby&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fwww.chesnok.com%2Fdaily%2F2010%2F07%2F12%2Fqa-about-hot-standby%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.chesnok.com/daily/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p><strong>Updated!</strong>: See below.</p>
<p>Here are some questions that came up from trying to use the current <a href="http://www.postgresql.org/docs/9.0/static/hot-standby.html">PostgreSQL hot standby</a> documentation: </p>
<p><strong>Q: If you set <code>hot_standby = off</code> after having it on, what happens?<br />
</strong><br />
A: This change requires a database restart on the hot standby (or replica) server. The database goes into &#8220;warm standby&#8221; mode, and you can no longer issue queries against it. You can change this right back by setting the parameter to &#8216;on&#8217; and restarting again.</p>
<p><strong>Q: Can you use hot standby with only a single schema or database?<br />
</strong><br />
A: No. Hot Standby is all-or-nothing for a particular PostgreSQL <a href="http://www.postgresql.org/docs/9.0/static/creating-cluster.html">database cluster</a>. A cluster is made up of all the databases that live in a particular $PGDATA instance, and Hot Standby is currently not capable of distinguishing between changes occurring on different particular databases or schemas.</p>
<p><strong>Q: Is the process for setting up hot standby any different for empty databases vs. populated databases?<br />
</strong><br />
A: No. The setup process is the same &#8211; you must create a <a href="http://www.postgresql.org/docs/9.0/static/continuous-archiving.html#BACKUP-BASE-BACKUP">base backup</a>.</p>
<p><strong>Q: How do I bring my hot standby out of standby mode?<br />
</strong><br />
A: If you&#8217;re using something like the following in your recovery.conf file:<br />
<code><br />
restore_command = 'cp xxxx'<br />
standby_mode = 'on'<br />
</code></p>
<p>Change: <code>standby_mode = 'off'</code> and restart your hot standby postgresql instance.</p>
<p><strong>Q: Where did my <code>recovery.conf</code> file go? (after your database came out of warm/hot standby)<br />
</strong><br />
A: PostgreSQL automatically changes the name of the file to <code>recovery.done</code> when recovery completes. This helps prevent accidents.</p>
<p><strong>Q: What happens if my <code>archive_timeout = 60</code> (which creates a 16mb file every minute) and I flood the database with so much activity that my standby falls behind?<br />
</strong><br />
A: This is possible, and you may be interested in trying <a href="http://www.postgresql.org/docs/9.0/static/warm-standby.html#STREAMING-REPLICATION">Streaming Replication</a>. However, for the majority of users, a delay in restoring data is acceptable (and possibly desirable). Eventually the standby server will catch up.  You can monitor how delayed the server is using functions like   <code>txid_current_snapshot()</code>.</p>
<p><strong>Q: Are schema changes (like CREATE TABLE or ALTER TABLE) replicated to the standby?<br />
</strong><br />
A: Yes! All changes to the database cluster are copied to the standby. This includes any DDL operations, new rows, the effects of autovacuum &#8212; any change to the data store on the master is copied to the standby.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chesnok.com/daily/2010/07/12/qa-about-hot-standby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

