Re: Configuring Standby Server in PostgreSQL 9.3.3

Lists: pgsql-bugs
From: <fburgess(at)radiantblue(dot)com>
To: "John R Pierce" <pierce(at)hogranch(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Configuring Standby Server in PostgreSQL 9.3.3
Date: 2014-04-02 21:58:03
Message-ID: 20140402145803.5a830134ae84016b0174832fdc1a3173.077b66cde0.wbe@email11.secureserver.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>HI John, all of the backups we have taken were from the 24/7 uptime operational production servers. The 4-5 days duration is taken from these backups. Several months ago we restored one of these backups to another higher capacity database server on fiber channel storage in a different location, then we upgraded postgis from 1.5.8 to 2.1.1 and PostgreSQL from 9.1.6 to 9.3.3, that restore took 9-10 days to finish. We have another VM that has been set aside to be stood up asap as our standby server to this primary. Currently, this standby VM only has Linux 6.4 installed, no PostgreSQL or PostGIS. I was thinking if we can perform a VM clone, we wouldn't have to install PostgreSQL, Postgis, packages, etc., on the standby server.<br></div><div><br></div><div><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: Re: [BUGS] Configuring Standby Server in PostgreSQL 9.3.3<br>
From: John R Pierce &lt;<a href="mailto:pierce(at)hogranch(dot)com">pierce(at)hogranch(dot)com</a>&gt;<br>
Date: Wed, April 02, 2014 1:46 pm<br>
To: <a href="mailto:fburgess(at)radiantblue(dot)com">fburgess(at)radiantblue(dot)com</a>, <a href="mailto:pgsql-bugs(at)postgresql(dot)org">pgsql-bugs(at)postgresql(dot)org</a><br>
<br>
<div class="moz-cite-prefix">On 4/2/2014 11:07 AM, <a target="_blank" class="moz-txt-link-abbreviated" href="mailto:fburgess(at)radiantblue(dot)com">fburgess(at)radiantblue(dot)com</a> wrote:<br> </div> <blockquote cite="mid:20140402110749(dot)5a830134ae84016b0174832fdc1a3173(dot)28ee073a59(dot)wbe(at)email11(dot)secureserver(dot)net" type="cite"><span style="font-family:Verdana; color:#000000; font-size:10pt;">We want to do this because our database is 7TB and takes 4-5 to backup and 8-9 days to restore to the standby server.</span></blockquote> <br> <br> <br> that might be true for pg_dump/pg_restore type backups, but the initial copy made for streaming replication is a file system copy/clone.<br> <br> how long does pg_basebackup&nbsp; take with your system operational?<br> <br> <pre class="moz-signature" cols="72">--
john r pierce 37N 122W
somewhere on the middle of the left coast</pre>
</div>
</blockquote></span></body></html>

Attachment Content-Type Size
unknown_filename text/html 2.4 KB

From: John R Pierce <pierce(at)hogranch(dot)com>
To: fburgess(at)radiantblue(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Configuring Standby Server in PostgreSQL 9.3.3
Date: 2014-04-02 22:13:53
Message-ID: 533C8BA1.6070104@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On 4/2/2014 2:58 PM, fburgess(at)radiantblue(dot)com wrote:
> HI John, all of the backups we have taken were from the 24/7 uptime
> operational production servers. The 4-5 days duration is taken from
> these backups. Several months ago we restored one of these backups to
> another higher capacity database server on fiber channel storage in a
> different location, then we upgraded postgis from 1.5.8 to 2.1.1 and
> PostgreSQL from 9.1.6 to 9.3.3, that restore took 9-10 days to finish.
> We have another VM that has been set aside to be stood up asap as our
> standby server to this primary. Currently, this standby VM only has
> Linux 6.4 installed, no PostgreSQL or PostGIS. I was thinking if we
> can perform a VM clone, we wouldn't have to install PostgreSQL,
> Postgis, packages, etc., on the standby server.
>

was that a file backup of the $PGDATA directory, or a database dump ?

you CANT start streaming replication with a database dump, as its not
the same timeline. you have to use a file system level backup.

quite frankly, dealing with a production database this large, I do
believe I am going to recommend you bring an experienced postgresql
consultant on board who's dealt extensively with large scale
replication, someone like 2ndQuadrant, or CommandPrompt, or PGExperts,
etc, and let them advise you.

--
john r pierce 37N 122W
somewhere on the middle of the left coast