Configuring Standby Server in PostgreSQL 9.3.3

From: <fburgess(at)radiantblue(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Configuring Standby Server in PostgreSQL 9.3.3
Date: 2014-04-02 18:07:49
Message-ID: 20140402110749.5a830134ae84016b0174832fdc1a3173.28ee073a59.wbe@email11.secureserver.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>PostgreSQL version: 9.3.3<br>
Operating system: Redhat 6.4 Linux<br>
Description: </div><div><br></div><div>
We are in the process of setting up a standby server. Instead of restoring from a backup taken from primary server, <br>we want to shutdown the primary server, and then copy the primary database VM image to the standby server.<br><br>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.<br><br>Mock Primary :192.168.1.50<br>Mock standby:192.168.1.100<br><br>1.) Configure pg_hda.conf on primary<br><br># Allow the user "postgres" from host 192.168.1.100 to connect to the primary<br># as a replication standby if the user's password is correctly supplied.<br>#<br># TYPE&nbsp; DATABASE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; USER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ADDRESS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; METHOD<br>host&nbsp;&nbsp;&nbsp; replication&nbsp;&nbsp;&nbsp;&nbsp; postgres&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 192.168.1.100/32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; md5<br><br><br>2.) Configure recovery.conf on standby<br><br>standby_mode = 'on'<br>primary_conninfo = 'host=192.168.1.50 port=5432 user=postgres password=foopass'<br>restore_command = 'cp /path/to/archive/%f %p'<br>archive_cleanup_command = 'pg_archivecleanup /path/to/archive %r'<br><br>3.) re-start both servers<br><br>Question #1 Is this feasible?<br>Question #2 Have I missed critical steps?</div><div><br></div><div>Thanks<br></div></span></body></html>

Attachment Content-Type Size
unknown_filename text/html 1.7 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2014-04-02 20:46:41 Re: Configuring Standby Server in PostgreSQL 9.3.3
Previous Message Heikki Linnakangas 2014-04-02 08:22:03 GiST does palloc's in critical section