Re: Postgres replication

From: Samed YILDIRIM <samed(at)reddoc(dot)net>
To: "Gone, Sajan" <sgone(at)lb(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Postgres replication
Date: 2017-04-14 14:34:50
Message-ID: 3891051492180490@web51g.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

<div>Hi Sajan,</div><div> </div><div>You can use following query.</div><div> </div><div>select * from pg_stat_replication;</div><div> </div><div>Best regards.</div><div>Samed YILDIRIM</div><div> </div><div> </div><div> </div><div>14.04.2017, 17:20, "Gone, Sajan" &lt;sgone(at)lb(dot)com&gt;:</div><blockquote type="cite"><div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;"><div><span style="font-size:16px;">Hi Samed,</span></div><div> </div><div><span style="font-size:16px;">  Thanks for sending out the weblink. I was able to successfully set the replication up (Master/Slave, Hot stand by).</span></div><div> </div><div><span style="font-size:16px;">I really appreciate your help on this.</span></div><div><span style="font-size:16px;"> </span></div><div><span style="font-size:16px;">My background is mostly on MySQL so my next question would be on how to look at the replication status. Like MySQL  “Show slave status \G” command is there any command on postgres to look at the slave current status(or replication status).</span></div><div> </div><div><div><span style="font-size:16px;">Thank You,</span></div><div><span style="font-size:16px;">Sajan Gone.</span></div></div><div style="font-family:Calibri;font-size:11pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt;"><span style="font-size:14px;"><strong style="font-weight:bold;">From: </strong>Samed YILDIRIM &lt;<a href="mailto:samed(at)reddoc(dot)net">samed(at)reddoc(dot)net</a>&gt;<br /><strong style="font-weight:bold;">Date: </strong>Thursday, April 13, 2017 at 4:27 PM<br /><strong style="font-weight:bold;">To: </strong>Sajan Gone &lt;<a href="mailto:sgone(at)lb(dot)com">sgone(at)lb(dot)com</a>&gt;, "<a href="mailto:pgsql-admin(at)postgresql(dot)org">pgsql-admin(at)postgresql(dot)org</a>" &lt;<a href="mailto:pgsql-admin(at)postgresql(dot)org">pgsql-admin(at)postgresql(dot)org</a>&gt;<br /><strong style="font-weight:bold;">Subject: </strong>Re: [ADMIN] Postgres replication</span></div><div> </div><div><div><span style="font-size:14px;">Hi Sajan, </span><div> </div><span style="font-size:14px;"> </span><div><span style="font-size:14px;">You can take a look following document. <span style="font-family:sans-serif;">It is good for a start point.</span></span></div><span style="font-size:14px;"> </span><div> </div><span style="font-size:14px;"> </span><div><span style="font-size:14px;"><a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps">https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps</a></span></div><span style="font-size:14px;"> </span><div> </div><span style="font-size:14px;"> </span><div><span style="font-size:14px;">Best regards.</span></div><span style="font-size:14px;"> </span><div><br /><span style="font-size:14px;">22:25, 13 Nisan 2017, "Gone, Sajan" &lt;<a href="mailto:sgone(at)lb(dot)com">sgone(at)lb(dot)com</a>&gt;:</span><br /><br /><br /><br /> <blockquote><div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;"> <div><span style="font-size:14px;"><span style="font-size:16px;">Hello,</span></span></div> <div> </div> <div><span style="font-size:14px;"><span style="font-size:16px;">Good afternoon everyone. </span></span></div> <div><br /> </div> <div><span style="font-size:14px;"><span style="font-size:16px;">  This is Sajan Gone, I am trying to setup a Standard Master/Salve replication between two postgres instances. I am pretty much new to postgres and not exactly sure how replication works and what is an architecture behind<br />it.  As of now I am following the standard postgres documentation @ <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.postgresql.org_docs_current_static_warm-2Dstandby.html-23PREPARING-2DMASTER-2DFOR-2DSTANDBY&amp;d=DwMGaQ&amp;c=spYp1tZ3AQD6dfuI6rqaeg&amp;r=7n1bLwXDzepgjKSNziw-ng&amp;m=Vi2JxqEOxr992ibCDezMAd_sbdja65aRxMh4oM6WYpo&amp;s=Qb_JJynxAr1X-KEpv8g-FVJ4Ac4wuqLr6fR3IfEVNpo&amp;e=">https://www.postgresql.org/docs/current/static/warm-standby.html#PREPARING-MASTER-FOR-STANDBY</a>,<br />however it is slightly difficult for me to understand.</span></span></div> <div><br /> </div> <div><span style="font-size:14px;"><span style="font-size:16px;">It would be very helpful if any one could guide me in a proper way on setting up Master/Slave replication on postgres. Any recommendations on good documentation<br />or study materials on postgres replication would be highly appreciated.</span></span></div> <div><br /> </div> <div><span style="font-size:14px;"><span style="font-size:16px;">Many Thanks in advance.</span></span></div> <div><br /> </div> <div> <div><span style="font-size:14px;"><span style="font-size:16px;">Thank You,</span></span></div> <div><span style="font-size:14px;"><span style="font-size:16px;">Sajan Gone</span></span></div> <div><br /> </div></div><br /><br /> <hr /><br /><br /><br /><span style="font-size:14px;"><font size="1" face="Arial" color="Gray">Notice: This communication may contain privileged and/or confidential information. If you are not the intended recipient, please notify the sender by email, and immediately delete the message and any attachments without copying or disclosing them. LB may, for<br />any reason, intercept, access, use, and disclose any information that is communicated by or through, or which is stored on, its networks, applications, services, and devices.</font></span><br /><br /> </div><br /> </blockquote><span style="font-size:14px;"> </span></div><span style="font-size:14px;"> </span></div></div> <hr /><br /><font size="1" face="Arial" color="Gray">Notice: This communication may contain privileged and/or confidential information. If you are not the intended recipient, please notify the sender by email, and immediately delete the message and any attachments without copying or disclosing them. LB may, for any reason, intercept, access, use, and disclose any information that is communicated by or through, or which is stored on, its networks, applications, services, and devices.</font></div></blockquote>

Attachment Content-Type Size
unknown_filename text/html 6.1 KB

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Santiago DIEZ 2017-04-14 15:55:39 Change Unix Socket directory at build time
Previous Message Keith 2017-04-14 14:32:30 Re: Postgres replication