pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postgres replication
26+ messages / 14 participants
[nested] [flat]

* Postgres replication
@ 2008-01-10 07:38  nalini <nalini@nic.in>
  0 siblings, 2 replies; 26+ messages in thread

From: nalini @ 2008-01-10 07:38 UTC (permalink / raw)
  To: pgsql-admin

Dear All

I have a application running at various locations with backend as postgres
Slony is configured at all locations for replication at local site anda central server where each site has its own database instance.

Now we wish to merge data collected from all the sites into one database instance to provide consolidated view

database schema is same at all the places
However as the application is still under development the schema maychange. however the change will happen at all the locations.

Pls suggest a solution

with regards


Nalini S. Nautiyal

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2008-01-10 15:10  Kevin Kempter <kevin@kevinkempterllc.com>
  parent: nalini <nalini@nic.in>
  1 sibling, 0 replies; 26+ messages in thread

From: Kevin Kempter @ 2008-01-10 15:10 UTC (permalink / raw)
  To: pgsql-admin

On Thursday 10 January 2008 00:38:38 nalini wrote:
> Dear All
>
> I have a application running at various locations with backend as postgres
> Slony is configured at all locations for replication at local site anda
> central server where each site has its own database instance.
>
> Now we wish to merge data collected from all the sites into one database
> instance to provide consolidated view
>
> database schema is same at all the places
> However as the application is still under development the schema maychange.
> however the change will happen at all the locations.
>
> Pls suggest a solution
>
> with regards
>
>
> Nalini S. Nautiyal

Maybe you could use dblink (in contribs) or dbi-link (see pgfoundry) and 
create a db full of remote "views" each one being a join that retrieves all 
data for that table from all related databases/clusters ?

/Kevin




^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2008-01-10 15:19  Scott Marlowe <scott.marlowe@gmail.com>
  parent: nalini <nalini@nic.in>
  1 sibling, 1 reply; 26+ messages in thread

From: Scott Marlowe @ 2008-01-10 15:19 UTC (permalink / raw)
  To: nalini <nalini@nic.in>; +Cc: pgsql-admin

On Jan 10, 2008 1:38 AM, nalini <nalini@nic.in> wrote:
> Dear All
>
> I have a application running at various locations with backend as postgres
> Slony is configured at all locations for replication at local site anda
> central server where each site has its own database instance.
>
> Now we wish to merge data collected from all the sites into one database
> instance to provide consolidated view
>
> database schema is same at all the places
> However as the application is still under development the schema maychange.
> however the change will happen at all the locations.

I would replicate each one to a different schema on the same server
and then use views to consolidate the data into what appears to be one
set.  To make everything unique, you could prepend a unique id to each
identifier based on the schema it came from.



^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2008-01-11 11:39  nalini <nalini@nic.in>
  parent: Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 0 replies; 26+ messages in thread

From: nalini @ 2008-01-11 11:39 UTC (permalink / raw)
  To: Scott Marlowe <scott.marlowe@gmail.com>; +Cc: pgsql-admin

Thanks for the suggestion. I would still like to know whether we have any tools available in open source domain for the same. Handling views may become difficult due to size and complexity of the database  




----- Original Message -----
From: Scott Marlowe <scott.marlowe@gmail.com>
Date: Thursday, January 10, 2008 8:48 pm
Subject: Re: [ADMIN] Postgres replication
To: nalini <nalini@nic.in>
Cc: pgsql-admin@postgresql.org

> On Jan 10, 2008 1:38 AM, nalini <nalini@nic.in> wrote:
> > Dear All
> >
> > I have a application running at various locations with backend 
> as postgres
> > Slony is configured at all locations for replication at local 
> site anda
> > central server where each site has its own database instance.
> >
> > Now we wish to merge data collected from all the sites into 
> one database
> > instance to provide consolidated view
> >
> > database schema is same at all the places
> > However as the application is still under development the 
> schema maychange.
> > however the change will happen at all the locations.
> 
> I would replicate each one to a different schema on the same server
> and then use views to consolidate the data into what appears to 
> be one
> set.  To make everything unique, you could prepend a unique 
> id to each
> identifier based on the schema it came from.
> 
> ---------------------------(end of broadcast)--------------------
> -------
> TIP 6: explain analyze is your friend

Nalini S. Nautiyal

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Postgres - Replication
@ 2017-03-15 04:59  jasoninmel <jasoninmel+1@gmail.com>
  0 siblings, 1 reply; 26+ messages in thread

From: jasoninmel @ 2017-03-15 04:59 UTC (permalink / raw)
  To: pgsql-admin

Hi there,I have used Postgres with Master/Slave setup and I've used streaming
replication to keep the slave instance up to date with Master.Now I want to
have a DR site and ensure the secondary site also has up to date data.What
is the best replication method recommended for this purpose?Thanks,Jason



--
View this message in context: http://www.postgresql-archive.org/Postgres-Replication-tp5949678.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-15 11:21  Samed YILDIRIM <samed@reddoc.net>
  parent: jasoninmel <jasoninmel+1@gmail.com>
  0 siblings, 1 reply; 26+ messages in thread

From: Samed YILDIRIM @ 2017-03-15 11:21 UTC (permalink / raw)
  To: jasoninmel <jasoninmel+1@gmail.com>; pgsql-admin

<div>Hi Jason,</div><div> </div><div>How much data loss toleration do you have? Which version of Postgres are you using?</div><div> </div><div>If no data loss is required and Postgres version is 9.6, you can use synchronous replication.</div><div>If you have data loss tolerance you can use asynchronous replication or delayed replication.</div><div> </div><div>Best regards.</div><div> </div><div>İyi çalışmalar.</div><div>Samed YILDIRIM</div><div> </div><div> </div><div> </div><div>15.03.2017, 08:01, "jasoninmel" &lt;jasoninmel+1@gmail.com&gt;:</div><blockquote type="cite">Hi there, I have used Postgres with Master/Slave setup and I've used streaming replication to keep the slave instance up to date with Master. Now I want to have a DR site and ensure the secondary site also has up to date data. What is the best replication method recommended for this purpose? Thanks, Jason<hr width="300" align="left" /> View this message in context: <a href="http://www.postgresql-archive.org/Postgres-Replication-tp5949678.html">Postgres - Replication</a><br />Sent from the <a href="http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html">PostgreSQL - admin mailing list archive</a> at Nabble.com.</blockquote>

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-17 03:30  jasoninmel <jasoninmel+1@gmail.com>
  parent: Samed YILDIRIM <samed@reddoc.net>
  0 siblings, 1 reply; 26+ messages in thread

From: jasoninmel @ 2017-03-17 03:30 UTC (permalink / raw)
  To: pgsql-admin


Thanks Samed.

Perhaps the question may not be clear and sorry about that. 

What I'm looking for is an option to scale the solution to multi site
configuration where two different sites located in different geographical
locations to be able to maintain data in sync.

Currently I'm using synchronous streaming replication and one option I've
evaluated is cascading replication. 



--
View this message in context: http://www.postgresql-archive.org/Postgres-Replication-tp5949678p5950172.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-17 03:34  jasoninmel <jasoninmel+1@gmail.com>
  parent: jasoninmel <jasoninmel+1@gmail.com>
  0 siblings, 2 replies; 26+ messages in thread

From: jasoninmel @ 2017-03-17 03:34 UTC (permalink / raw)
  To: pgsql-admin

Here is bit more background of the work I've done and issues around them.

What I'm looking for is an option to scale the solution to multi site
configuration where two different sites located in different geographical
locations to be able to maintain data in sync.

Currently I'm using synchronous streaming replication and one option I've
evaluated is cascading replication. Issues or concerns so far I have with
this setup are;

1. Only supports async replication
2. Automatic failover script I have built (have been using for several years
now without an issue) would 3. have to be enhanced to be intelligent to
switch to new master in primary site in the event primary fails.
4. All the standby servers including cascading standby would not allow
writes.


Happy to understand if there are implementations done by an expert in this
forum with solutions for these concerns.

Please note that I'm open for any other replication method that would allow
better scalability. One of the best option would be to have Multi-master
setup though I haven't seen any documentation around the support for such
capability by Postgres.

Thanks,
Jason



--
View this message in context: http://www.postgresql-archive.org/Postgres-Replication-tp5949678p5950175.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-17 03:51  Rosser Schwarz <rosser.schwarz@gmail.com>
  parent: jasoninmel <jasoninmel+1@gmail.com>
  1 sibling, 0 replies; 26+ messages in thread

From: Rosser Schwarz @ 2017-03-17 03:51 UTC (permalink / raw)
  To: jasoninmel <jasoninmel+1@gmail.com>; pgsql-admin

On Thu, Mar 16, 2017 at 20:35 jasoninmel <jasoninmel+1@gmail.com> wrote:

> Please note that I'm open for any other replication method that would allow
> better scalability. One of the best option would be to have Multi-master
> setup though I haven't seen any documentation around the support for such
> capability by Postgres.


Have you considered third-party tools like Bucardo? It, particularly, was
designed for replicating across unreliable WAN links, and is currently in
active use replicating large volumes of data between sites separated by
oceans and continents.

It has overhead, and is asynchronous, but supports multi-master (where N >
2), and will simply queue changes for replication in the event of link
failure.

It may not suit your needs, but it's probably worth considering

rls

-- 
:wq

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-18 16:41  bricklen <bricklen@gmail.com>
  parent: jasoninmel <jasoninmel+1@gmail.com>
  1 sibling, 1 reply; 26+ messages in thread

From: bricklen @ 2017-03-18 16:41 UTC (permalink / raw)
  To: jasoninmel <jasoninmel+1@gmail.com>; +Cc: pgsql-admin

On Thu, Mar 16, 2017 at 8:34 PM, jasoninmel <jasoninmel+1@gmail.com> wrote:

> Please note that I'm open for any other replication method that would allow
> better scalability. One of the best option would be to have Multi-master
> setup though I haven't seen any documentation around the support for such
> capability by Postgres.
>

Postgresql doesn't support multi-master in the core project but there are
options available. Have you come across BiDirectional Replication (BDR)
yet?  https://2ndquadrant.com/en/resources/bdr/

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-18 16:54  Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>
  parent: bricklen <bricklen@gmail.com>
  0 siblings, 2 replies; 26+ messages in thread

From: Alvaro Aguayo Garcia-Rada @ 2017-03-18 16:54 UTC (permalink / raw)
  To: bricklen <bricklen@gmail.com>; +Cc: pgsql-admin@postgresql.org, jasoninmel <jasoninmel+1@gmail.com>

I have some experience with BDR. Works fine.

Alvaro Aguayo
Jefe de Operaciones
Open Comb Systems E.I.R.L.

Oficina: (+51-1) 3377813 | RPM: #034252 / (+51) 995540103  | RPC: (+51) 954183248
Website: www.ocs.pe

----- Original Message -----
From: "bricklen" <bricklen@gmail.com>
To: "jasoninmel" <jasoninmel+1@gmail.com>
Cc: pgsql-admin@postgresql.org
Sent: Saturday, 18 March, 2017 11:41:48 AM
Subject: Re: [ADMIN] Postgres - Replication





On Thu, Mar 16, 2017 at 8:34 PM, jasoninmel < jasoninmel+1@gmail.com > wrote: 



Please note that I'm open for any other replication method that would allow 
better scalability. One of the best option would be to have Multi-master 
setup though I haven't seen any documentation around the support for such 
capability by Postgres. 


Postgresql doesn't support multi-master in the core project but there are options available. Have you come across BiDirectional Replication (BDR) yet? https://2ndquadrant.com/en/resources/bdr/ 


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-21 03:36  jasoninmel <jasoninmel+1@gmail.com>
  parent: Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>
  1 sibling, 0 replies; 26+ messages in thread

From: jasoninmel @ 2017-03-21 03:36 UTC (permalink / raw)
  To: pgsql-admin

Thank you very much bricklen for the recommending BDR. It looks like a
potential candidate and will surely give it a try. 



--
View this message in context: http://www.postgresql-archive.org/Postgres-Replication-tp5949678p5950815.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-21 08:07  Om Prakash Jaiswal <op12om@yahoo.co.in>
  parent: Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>
  1 sibling, 1 reply; 26+ messages in thread

From: Om Prakash Jaiswal @ 2017-03-21 08:07 UTC (permalink / raw)
  To: Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>; bricklen <bricklen@gmail.com>; +Cc: pgsql-admin; jasoninmel <jasoninmel+1@gmail.com>

I am using Bucardo.It is working fine. It has been runinning for 5 years across 50 replicated nodes.I strongly recommend Bucardo for master-master replication.It is trigger based asynchronous replication system.
RegardsOm Prakash
 

    On Saturday, 18 March 2017 10:24 PM, Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com> wrote:
 

 I have some experience with BDR. Works fine.

Alvaro Aguayo
Jefe de Operaciones
Open Comb Systems E.I.R.L.

Oficina: (+51-1) 3377813 | RPM: #034252 / (+51) 995540103  | RPC: (+51) 954183248
Website: www.ocs.pe

----- Original Message -----
From: "bricklen" <bricklen@gmail.com>
To: "jasoninmel" <jasoninmel+1@gmail.com>
Cc: pgsql-admin@postgresql.org
Sent: Saturday, 18 March, 2017 11:41:48 AM
Subject: Re: [ADMIN] Postgres - Replication





On Thu, Mar 16, 2017 at 8:34 PM, jasoninmel < jasoninmel+1@gmail.com > wrote: 



Please note that I'm open for any other replication method that would allow 
better scalability. One of the best option would be to have Multi-master 
setup though I haven't seen any documentation around the support for such 
capability by Postgres. 


Postgresql doesn't support multi-master in the core project but there are options available. Have you come across BiDirectional Replication (BDR) yet? https://2ndquadrant.com/en/resources/bdr/ 


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


   

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-21 11:07  Michael@sqlexec.com <michael@sqlexec.com>
  parent: Om Prakash Jaiswal <op12om@yahoo.co.in>
  0 siblings, 1 reply; 26+ messages in thread

From: Michael@sqlexec.com @ 2017-03-21 11:07 UTC (permalink / raw)
  To: Om Prakash Jaiswal <op12om@yahoo.co.in>; +Cc: Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>; bricklen <bricklen@gmail.com>; pgsql-admin; jasoninmel <jasoninmel+1@gmail.com>

BDR works fine for writeloads that are geographically separate.  True multi-master is ACID compliant when you have a global transaction manager like Postgres-xc or Postgres-xl.

Regards


Sent from my iPad

> On Mar 21, 2017, at 4:07 AM, Om Prakash Jaiswal <op12om@yahoo.co.in> wrote:
> 
> I am using Bucardo.
> It is working fine. It has been runinning for 5 years across 50 replicated nodes.
> I strongly recommend Bucardo for master-master replication.
> It is trigger based asynchronous replication system.
> 
> Regards
> Om Prakash
> 
> 
> 
> On Saturday, 18 March 2017 10:24 PM, Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com> wrote:
> 
> 
> I have some experience with BDR. Works fine.
> 
> Alvaro Aguayo
> Jefe de Operaciones
> Open Comb Systems E.I.R.L.
> 
> Oficina: (+51-1) 3377813 | RPM: #034252 / (+51) 995540103  | RPC: (+51) 954183248
> Website: www.ocs.pe
> 
> ----- Original Message -----
> From: "bricklen" <bricklen@gmail.com>
> To: "jasoninmel" <jasoninmel+1@gmail.com>
> Cc: pgsql-admin@postgresql.org
> Sent: Saturday, 18 March, 2017 11:41:48 AM
> Subject: Re: [ADMIN] Postgres - Replication
> 
> 
> 
> 
> 
> On Thu, Mar 16, 2017 at 8:34 PM, jasoninmel < jasoninmel+1@gmail.com > wrote: 
> 
> 
> 
> Please note that I'm open for any other replication method that would allow 
> better scalability. One of the best option would be to have Multi-master 
> setup though I haven't seen any documentation around the support for such 
> capability by Postgres. 
> 
> 
> Postgresql doesn't support multi-master in the core project but there are options available. Have you come across BiDirectional Replication (BDR) yet? https://2ndquadrant.com/en/resources/bdr/
> 
> 
> 
> -- 
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
> 
> 
> 

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-03-21 13:44  Poul Kristensen <bcc5226@gmail.com>
  parent: Michael@sqlexec.com <michael@sqlexec.com>
  0 siblings, 0 replies; 26+ messages in thread

From: Poul Kristensen @ 2017-03-21 13:44 UTC (permalink / raw)
  To: Michael@sqlexec.com <michael@sqlexec.com>; +Cc: Om Prakash Jaiswal <op12om@yahoo.co.in>; Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>; bricklen <bricklen@gmail.com>; pgsql-admin; jasoninmel <jasoninmel+1@gmail.com>

If you redirect you syslog to another server, the "pg_log" will be written
in
/var/log/... and pg_log will just write that it has been redirected.

/Poul



2017-03-21 12:07 GMT+01:00 Michael@sqlexec.com <michael@sqlexec.com>:

> BDR works fine for writeloads that are geographically separate.  True
> multi-master is ACID compliant when you have a global transaction manager
> like Postgres-xc or Postgres-xl.
>
> Regards
>
>
> Sent from my iPad
>
> On Mar 21, 2017, at 4:07 AM, Om Prakash Jaiswal <op12om@yahoo.co.in>
> wrote:
>
> I am using Bucardo.
> It is working fine. It has been runinning for 5 years across 50 replicated
> nodes.
> I strongly recommend Bucardo for master-master replication.
> It is trigger based asynchronous replication system.
>
> Regards
> Om Prakash
>
>
>
> On Saturday, 18 March 2017 10:24 PM, Alvaro Aguayo Garcia-Rada <
> aaguayo@opensysperu.com> wrote:
>
>
> I have some experience with BDR. Works fine.
>
> Alvaro Aguayo
> Jefe de Operaciones
> Open Comb Systems E.I.R.L.
>
> Oficina: (+51-1) 3377813 <+51%201%203377813> | RPM: #034252 / (+51)
> 995540103 <+51%20995%20540%20103>  | RPC: (+51) 954183248
> <+51%20954%20183%20248>
> Website: www.ocs.pe
>
> ----- Original Message -----
> From: "bricklen" <bricklen@gmail.com>
> To: "jasoninmel" <jasoninmel+1@gmail.com>
> Cc: pgsql-admin@postgresql.org
> Sent: Saturday, 18 March, 2017 11:41:48 AM
> Subject: Re: [ADMIN] Postgres - Replication
>
>
>
>
>
> On Thu, Mar 16, 2017 at 8:34 PM, jasoninmel < jasoninmel+1@gmail.com >
> wrote:
>
>
>
> Please note that I'm open for any other replication method that would
> allow
> better scalability. One of the best option would be to have Multi-master
> setup though I haven't seen any documentation around the support for such
> capability by Postgres.
>
>
> Postgresql doesn't support multi-master in the core project but there are
> options available. Have you come across BiDirectional Replication (BDR)
> yet? https://2ndquadrant.com/en/resources/bdr/
>
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>
>
>
>


-- 
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Postgres replication
@ 2017-04-13 19:23  Gone, Sajan <SGone@lb.com>
  0 siblings, 1 reply; 26+ messages in thread

From: Gone, Sajan @ 2017-04-13 19:23 UTC (permalink / raw)
  To: pgsql-admin

Hello,
Good afternoon everyone.

  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 it.  As of now I am following the standard postgres documentation @ https://www.postgresql.org/docs/current/static/warm-standby.html#PREPARING-MASTER-FOR-STANDBY, however it is slightly difficult for me to understand.

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 or study materials on postgres replication would be highly appreciated.

Many Thanks in advance.

Thank You,
Sajan Gone


________________________________

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.

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2017-04-13 20:27  Samed YILDIRIM <samed@reddoc.net>
  parent: Gone, Sajan <SGone@lb.com>
  0 siblings, 1 reply; 26+ messages in thread

From: Samed YILDIRIM @ 2017-04-13 20:27 UTC (permalink / raw)
  To: Gone, Sajan <sgone@lb.com>; pgsql-admin

Hi Sajan,<div><br /></div><div>You can take a look following document. <span style="font-family:sans-serif;">It is good for a start point.</span></div><div><span style="font-family:sans-serif;"><br /></span></div><div>https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresq... /></div><div>Best regards.</div><div><br />22:25, 13 Nisan 2017, "Gone, Sajan" &lt;sgone@lb.com&gt;:<br /><blockquote><br /><br /><br /><br /><div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;"><br /><div><span style="font-size:16px;">Hello,</span></div><br /><div><span style="white-space:pre;font-size:16px;"></span></div><br /><div><span style="font-size:16px;"><span style="white-space:pre;"></span>Good afternoon everyone. </span></div><br /><div><span style="font-size:16px;"><br /><br /></span></div><br /><div><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://www.postgresql.org/docs/current/static/warm-standby.html#PREPARING-MASTER-FOR-STANDBY"&g... /> however it is slightly difficult for me to understand.</span></div><br /><div><span style="font-size:16px;"><br /><br /></span></div><br /><div><span style="font-size:16px;"><span style="white-space:pre;"></span>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></div><br /><div><span style="font-size:16px;"><br /><br /></span></div><br /><div><span style="font-size:16px;"><span style="white-space:pre;"></span>Many Thanks in advance.</span></div><br /><div><span style="font-size:16px;"><br /><br /></span></div><br /><div><br /><div><span style="font-size:16px;">Thank You,</span></div><br /><div><span style="font-size:16px;">Sajan Gone</span></div><br /><div><br /><br /></div><br /></div><br /><br /><br /><hr /><br /><font face="Arial" color="Gray" size="1"><br /><br />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.<br /><br /></font><br /></div><br /><br /></blockquote></div>


^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2017-04-14 14:20  Gone, Sajan <SGone@lb.com>
  parent: Samed YILDIRIM <samed@reddoc.net>
  0 siblings, 2 replies; 26+ messages in thread

From: Gone, Sajan @ 2017-04-14 14:20 UTC (permalink / raw)
  To: Samed YILDIRIM <samed@reddoc.net>; pgsql-admin

Hi Samed,

  Thanks for sending out the weblink. I was able to successfully set the replication up (Master/Slave, Hot stand by).

I really appreciate your help on this.

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).

Thank You,
Sajan Gone.
From: Samed YILDIRIM <samed@reddoc.net<mailto:samed@reddoc.net>>
Date: Thursday, April 13, 2017 at 4:27 PM
To: Sajan Gone <sgone@lb.com<mailto:sgone@lb.com>>, "pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>" <pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>>
Subject: Re: [ADMIN] Postgres replication

Hi Sajan,

You can take a look following document. It is good for a start point.

https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresq...

Best regards.

22:25, 13 Nisan 2017, "Gone, Sajan" <sgone@lb.com<mailto:sgone@lb.com>>:





Hello,


Good afternoon everyone.




  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
it.  As of now I am following the standard postgres documentation @ https://www.postgresql.org/docs/current/static/warm-standby.html#PREPARING-MASTER-FOR-STANDBY<htt...;,
however it is slightly difficult for me to understand.




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
or study materials on postgres replication would be highly appreciated.




Many Thanks in advance.





Thank You,

Sajan Gone







________________________________



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.





________________________________

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.

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2017-04-14 14:32  Keith <keith@keithf4.com>
  parent: Gone, Sajan <SGone@lb.com>
  1 sibling, 0 replies; 26+ messages in thread

From: Keith @ 2017-04-14 14:32 UTC (permalink / raw)
  To: Gone, Sajan <SGone@lb.com>; +Cc: Samed YILDIRIM <samed@reddoc.net>; pgsql-admin

On Fri, Apr 14, 2017 at 10:20 AM, Gone, Sajan <SGone@lb.com> wrote:

> Hi Samed,
>
>   Thanks for sending out the weblink. I was able to successfully set the
> replication up (Master/Slave, Hot stand by).
>
> I really appreciate your help on this.
>
> 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).
>
> Thank You,
> Sajan Gone.
>



I discuss several of the most common here

https://www.keithf4.com/monitoring_streaming_slave_lag/




> From: Samed YILDIRIM <samed@reddoc.net>
> Date: Thursday, April 13, 2017 at 4:27 PM
> To: Sajan Gone <sgone@lb.com>, "pgsql-admin@postgresql.org" <
> pgsql-admin@postgresql.org>
> Subject: Re: [ADMIN] Postgres replication
>
> Hi Sajan,
>
> You can take a look following document. It is good for a start point.
>
> https://www.digitalocean.com/community/tutorials/how-to-
> set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps
>
> Best regards.
>
> 22:25, 13 Nisan 2017, "Gone, Sajan" <sgone@lb.com>:
>
>
>
>
>
>
> Hello,
>
>
> Good afternoon everyone.
>
>
>
>
>   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
> it.  As of now I am following the standard postgres documentation @
> https://www.postgresql.org/docs/current/static/warm-
> standby.html#PREPARING-MASTER-FOR-STANDBY
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.postgresql.org_docs_current_static_warm-2Ds...;
> ,
> however it is slightly difficult for me to understand.
>
>
>
>
> 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
> or study materials on postgres replication would be highly appreciated.
>
>
>
>
> Many Thanks in advance.
>
>
>
>
>
> Thank You,
>
> Sajan Gone
>
>
>
>
>
>
>
> ------------------------------
>
>
>
> 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.
>
>
>
>
>
> ------------------------------
>
> 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.
>

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2017-04-14 14:34  Samed YILDIRIM <samed@reddoc.net>
  parent: Gone, Sajan <SGone@lb.com>
  1 sibling, 1 reply; 26+ messages in thread

From: Samed YILDIRIM @ 2017-04-14 14:34 UTC (permalink / raw)
  To: Gone, Sajan <sgone@lb.com>; 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@lb.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@reddoc.net">samed@reddoc.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@lb.com">sgone@lb.com</a>&gt;, "<a href="mailto:pgsql-admin@postgresql.org">pgsql-admin@postgresql.org</a>" &lt;<a href="mailto:pgsql-admin@postgresql.org">pgsql-admin@postgresql.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-postgresq... 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@lb.com">sgone@lb.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-2Ds... />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>

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2017-04-17 12:52  Gone, Sajan <SGone@lb.com>
  parent: Samed YILDIRIM <samed@reddoc.net>
  0 siblings, 1 reply; 26+ messages in thread

From: Gone, Sajan @ 2017-04-17 12:52 UTC (permalink / raw)
  To: Samed YILDIRIM <samed@reddoc.net>; pgsql-admin

Thanks Samed. That sure works.

I have followed the documentation that you have provided at https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresq...; and the replication works perfectly fine. I am assuming this works perfectly fine for an Active/Passive setup, however I am wondering on how to setup Active/Active kind of an replication setup.

 Is Active/Active possible with postgres database, if so is there any documentation that I can follow to setup Active/Active replication ?

Thank You.

Thank You,
Sajan Gone


From: Samed YILDIRIM <samed@reddoc.net<mailto:samed@reddoc.net>>
Date: Friday, April 14, 2017 at 10:34 AM
To: Sajan Gone <sgone@lb.com<mailto:sgone@lb.com>>, "pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>" <pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>>
Subject: Re: [ADMIN] Postgres replication

Hi Sajan,

You can use following query.

select * from pg_stat_replication;

Best regards.
Samed YILDIRIM



14.04.2017, 17:20, "Gone, Sajan" <sgone@lb.com<mailto:sgone@lb.com>>:
Hi Samed,

  Thanks for sending out the weblink. I was able to successfully set the replication up (Master/Slave, Hot stand by).

I really appreciate your help on this.

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).

Thank You,
Sajan Gone.
From: Samed YILDIRIM <samed@reddoc.net<mailto:samed@reddoc.net>>
Date: Thursday, April 13, 2017 at 4:27 PM
To: Sajan Gone <sgone@lb.com<mailto:sgone@lb.com>>, "pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>" <pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>>
Subject: Re: [ADMIN] Postgres replication

Hi Sajan,

You can take a look following document. It is good for a start point.

https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresq...;

Best regards.

22:25, 13 Nisan 2017, "Gone, Sajan" <sgone@lb.com<mailto:sgone@lb.com>>:





Hello,



Good afternoon everyone.




  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
it.  As of now I am following the standard postgres documentation @ https://www.postgresql.org/docs/current/static/warm-standby.html#PREPARING-MASTER-FOR-STANDBY<htt...;,
however it is slightly difficult for me to understand.




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
or study materials on postgres replication would be highly appreciated.




Many Thanks in advance.





Thank You,

Sajan Gone






________________________________



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.





________________________________

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.

________________________________

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.

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2017-04-17 14:12  Samed YILDIRIM <samed@reddoc.net>
  parent: Gone, Sajan <SGone@lb.com>
  0 siblings, 1 reply; 26+ messages in thread

From: Samed YILDIRIM @ 2017-04-17 14:12 UTC (permalink / raw)
  To: Gone, Sajan <sgone@lb.com>; pgsql-admin

<div>Hi Sajan,</div><div> </div><div>What is meaning of Active/Active setup for you? Postgres provides 1 master (read/write) server and multiple synchronous/asynchronous (read-only) slave server with streaming replication build-in. If you want multiple master (read/write) PostgreSQL server, you should use an additional tool like BDR (Bi-Directional Replication), EDB Replication Server etc. Also Postgres-XC may be taken your interest.</div><div> </div><div><a href="https://www.2ndquadrant.com/en/resources/bdr/">https://www.2ndquadrant.com/en/resources/bdr/&... href="https://www.enterprisedb.com/products-services-training/products-overview/xdb-replication-server-mul... regards.</div><div>Samed YILDIRIM</div><div> </div><div> </div><div> </div><div>17.04.2017, 15:52, "Gone, Sajan" &lt;sgone@lb.com&gt;:</div><blockquote type="cite"><div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;"><div><span style="font-size:16px;">Thanks Samed. That sure works.</span></div><div> </div><div><span style="font-size:16px;">I have followed the documentation that you have provided at <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.digitalocean.com_community_tutorials_how-2D... the replication works perfectly fine. I am assuming this works perfectly fine for an Active/Passive setup, however I am wondering on how to setup Active/Active kind of an replication setup.</span></div><div> </div><div><span style="font-size:16px;"> Is Active/Active possible with postgres database, if so is there any documentation that I can follow to setup Active/Active replication ?</span></div><div> </div><div><span style="font-size:16px;">Thank You.</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 style="font-size:14px;"> </div></div><div style="font-size:14px;"> </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@reddoc.net">samed@reddoc.net</a>&gt;<br /><strong style="font-weight:bold;">Date: </strong>Friday, April 14, 2017 at 10:34 AM<br /><strong style="font-weight:bold;">To: </strong>Sajan Gone &lt;<a href="mailto:sgone@lb.com">sgone@lb.com</a>&gt;, "<a href="mailto:pgsql-admin@postgresql.org">pgsql-admin@postgresql.org</a>" &lt;<a href="mailto:pgsql-admin@postgresql.org">pgsql-admin@postgresql.org</a>&gt;<br /><strong style="font-weight:bold;">Subject: </strong>Re: [ADMIN] Postgres replication</span></div><div> </div><div><div><div><span style="font-size:14px;">Hi Sajan,</span></div><div><span style="font-size:14px;"> </span></div><div><span style="font-size:14px;">You can use following query.</span></div><div><span style="font-size:14px;"> </span></div><div><span style="font-size:14px;">select * from pg_stat_replication;</span></div><div><span style="font-size:14px;"> </span></div><div><span style="font-size:14px;">Best regards.</span></div><div><span style="font-size:14px;">Samed YILDIRIM</span></div><div><span style="font-size:14px;"> </span></div><div><span style="font-size:14px;"> </span></div><div><span style="font-size:14px;"> </span></div><div><span style="font-size:14px;">14.04.2017, 17:20, "Gone, Sajan" &lt;<a href="mailto:sgone@lb.com">sgone@lb.com</a>&gt;:</span></div><blockquote type="cite"><div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;"><div><span style="font-size:14px;"><span style="font-size:16px;">Hi Samed,</span></span></div><div><span style="font-size:14px;"> </span></div><div><span style="font-size:14px;"><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></span></div><div><span style="font-size:14px;"> </span></div><div><span style="font-size:14px;"><span style="font-size:16px;">I really appreciate your help on this.</span></span></div><div><span style="font-size:14px;"><span style="font-size:16px;"> </span></span></div><div><span style="font-size:14px;"><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></span></div><div><span style="font-size:14px;"> </span></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><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;"><span style="font-size:14px;"><strong style="font-weight:bold;">From: </strong>Samed YILDIRIM &lt;<a href="mailto:samed@reddoc.net">samed@reddoc.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@lb.com">sgone@lb.com</a>&gt;, "<a href="mailto:pgsql-admin@postgresql.org">pgsql-admin@postgresql.org</a>" &lt;<a href="mailto:pgsql-admin@postgresql.org">pgsql-admin@postgresql.org</a>&gt;<br /><strong style="font-weight:bold;">Subject: </strong>Re: [ADMIN] Postgres replication</span></span></div><div><span style="font-size:14px;"> </span></div><div><div><span style="font-size:14px;"><span style="font-size:14px;">Hi Sajan, </span> </span><div><span style="font-size:14px;"> </span></div><span style="font-size:14px;"> </span><div><span style="font-size:14px;"><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></span></div><span style="font-size:14px;"> </span><div><span style="font-size:14px;"> </span></div><span style="font-size:14px;"> </span><div><span style="font-size:14px;"><span style="font-size:14px;"><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.digitalocean.com_community_tutorials_how-2D... style="font-size:14px;"> </span><div><span style="font-size:14px;"> </span></div><span style="font-size:14px;"> </span><div><span style="font-size:14px;"><span style="font-size:14px;">Best regards.</span></span></div><span style="font-size:14px;"> </span><div><br /><span style="font-size:14px;"><span style="font-size:14px;">22:25, 13 Nisan 2017, "Gone, Sajan" &lt;<a href="mailto:sgone@lb.com">sgone@lb.com</a>&gt;:</span><br /><br /><br /><br />  </span><blockquote><div style="color:rgb(0,0,0);font-family:Calibri,sans-serif;"><span style="font-size:14px;">  </span><div><span style="font-size:14px;"><span style="font-size:14px;"><span style="font-size:16px;">Hello,</span></span></span></div><span style="font-size:14px;">   </span><div><span style="font-size:14px;"> </span></div><span style="font-size:14px;">   </span><div><span style="font-size:14px;"><span style="font-size:14px;"><span style="font-size:16px;">Good afternoon everyone. </span></span></span></div><span style="font-size:14px;">   </span><div><br /><span style="font-size:14px;"> </span></div><span style="font-size:14px;">   </span><div><span style="font-size:14px;"><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-2Ds... />however it is slightly difficult for me to understand.</span></span></span></div><span style="font-size:14px;">   </span><div><br /><span style="font-size:14px;"> </span></div><span style="font-size:14px;">   </span><div><span style="font-size:14px;"><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></span></div><span style="font-size:14px;">   </span><div><br /><span style="font-size:14px;"> </span></div><span style="font-size:14px;">   </span><div><span style="font-size:14px;"><span style="font-size:14px;"><span style="font-size:16px;">Many Thanks in advance.</span></span></span></div><span style="font-size:14px;">   </span><div><br /><span style="font-size:14px;"> </span></div><span style="font-size:14px;">   </span><div><span style="font-size:14px;">  </span><div><span style="font-size:14px;"><span style="font-size:14px;"><span style="font-size:16px;">Thank You,</span></span></span></div><span style="font-size:14px;">   </span><div><span style="font-size:14px;"><span style="font-size:14px;"><span style="font-size:16px;">Sajan Gone</span></span></span></div><span style="font-size:14px;">   </span><div><br /><span style="font-size:14px;"> </span></div><span style="font-size:14px;"> </span></div><br /><br /><span style="font-size:14px;">  </span><hr /><br /><br /><br /><span style="font-size:14px;"><span style="font-size:14px;"><font color="Gray" size="1" face="Arial">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 /> </span></div><br /><span style="font-size:14px;"> </span></blockquote><span style="font-size:14px;"> </span></div><span style="font-size:14px;"> </span></div></div><span style="font-size:14px;">  </span><hr /><br /><span style="font-size:14px;"><font color="Gray" size="1" face="Arial">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></span></div></blockquote></div></div> <hr /><br /><font color="Gray" size="1" face="Arial">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>

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2017-04-17 14:24  Gone, Sajan <SGone@lb.com>
  parent: Samed YILDIRIM <samed@reddoc.net>
  0 siblings, 0 replies; 26+ messages in thread

From: Gone, Sajan @ 2017-04-17 14:24 UTC (permalink / raw)
  To: Samed YILDIRIM <samed@reddoc.net>; pgsql-admin

Thanks Samed. I exactly mean Master/Master replication setup.

Appreciate your comments. I will look into those tools and products..

Thank You,
Sajan Gone


From: Samed YILDIRIM <samed@reddoc.net<mailto:samed@reddoc.net>>
Date: Monday, April 17, 2017 at 10:12 AM
To: Sajan Gone <sgone@lb.com<mailto:sgone@lb.com>>, "pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>" <pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>>
Subject: Re: [ADMIN] Postgres replication

streaming replication build-in.
________________________________

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.

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Postgres replication
@ 2017-04-19 15:00  Gone, Sajan <SGone@lb.com>
  0 siblings, 1 reply; 26+ messages in thread

From: Gone, Sajan @ 2017-04-19 15:00 UTC (permalink / raw)
  To: Samed YILDIRIM <samed@reddoc.net>; pgsql-admin

Hi,

   The replication worked fine until the server re-start on Master we did recently this morning. After the restart of the linux server, I have started the database backup on Master however when I logged on to the slave server I saw the replication is terminated between the master and the slave.

Here is the status of the slave when  I queried pg_stat_replication table:

postgres=# select * from pg_stat_replication ;
pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | backend_xmin | state
| sent_location | write_location | flush_location | replay_location | sync_priority | sync_state
-----+----------+---------+------------------+-------------+-----------------+-------------+---------------+--------------+-------
+---------------+----------------+----------------+-----------------+---------------+------------
(0 rows)

   Does we have to re-initiate the replication every time on postgres if we restart either the Master/Slave Server. If so how can I re-initiate the replication.

Please let me know your thoughts on this.

Thank You,
Sajan Gone
Database Administrator
L Brands
Mobile #: 517-990-5282
Office #:   614-577-7622

From: Samed YILDIRIM <samed@reddoc.net<mailto:samed@reddoc.net>>
Date: Friday, April 14, 2017 at 10:34 AM
To: Sajan Gone <sgone@lb.com<mailto:sgone@lb.com>>, "pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>" <pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>>
Subject: Re: [ADMIN] Postgres replication

Hi Sajan,

You can use following query.

select * from pg_stat_replication;

Best regards.
Samed YILDIRIM



14.04.2017, 17:20, "Gone, Sajan" <sgone@lb.com<mailto:sgone@lb.com>>:
Hi Samed,

  Thanks for sending out the weblink. I was able to successfully set the replication up (Master/Slave, Hot stand by).

I really appreciate your help on this.

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).

Thank You,
Sajan Gone.
From: Samed YILDIRIM <samed@reddoc.net<mailto:samed@reddoc.net>>
Date: Thursday, April 13, 2017 at 4:27 PM
To: Sajan Gone <sgone@lb.com<mailto:sgone@lb.com>>, "pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>" <pgsql-admin@postgresql.org<mailto:pgsql-admin@postgresql.org>>
Subject: Re: [ADMIN] Postgres replication

Hi Sajan,

You can take a look following document. It is good for a start point.

https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-on-postgresq...;

Best regards.

22:25, 13 Nisan 2017, "Gone, Sajan" <sgone@lb.com<mailto:sgone@lb.com>>:





Hello,



Good afternoon everyone.




  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
it.  As of now I am following the standard postgres documentation @ https://www.postgresql.org/docs/current/static/warm-standby.html#PREPARING-MASTER-FOR-STANDBY<htt...;,
however it is slightly difficult for me to understand.




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
or study materials on postgres replication would be highly appreciated.




Many Thanks in advance.





Thank You,

Sajan Gone






________________________________



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.





________________________________

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.

________________________________

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.


^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres replication
@ 2017-04-19 15:53  John Scalia <jayknowsunix@gmail.com>
  parent: Gone, Sajan <SGone@lb.com>
  0 siblings, 0 replies; 26+ messages in thread

From: John Scalia @ 2017-04-19 15:53 UTC (permalink / raw)
  To: Gone, Sajan <SGone@lb.com>; +Cc: Samed YILDIRIM <samed@reddoc.net>; pgsql-admin

My usual way of doing this, is to 1) stop the master, 2) stop the replica,
3) restart the master, and finally 40 restart the replica.Slaves don't try
to reconnect, they only attempt on startup. Your problem may now be that
some WAL logs on the master may have disappeared by now, so the slave will
not be able to catch up. Your only choice then is to rebuild it. Not really
a problem, as all you need to do is run a pg_basebackup against the master.

On Wed, Apr 19, 2017 at 11:00 AM, Gone, Sajan <SGone@lb.com> wrote:

> Hi,
>
>    The replication worked fine until the server re-start on Master we did
> recently this morning. After the restart of the linux server, I have
> started the database backup on Master however when I logged on to the slave
> server I saw the replication is terminated between the master and the slave.
>
> Here is the status of the slave when  I queried pg_stat_replication table:
>
> postgres=# select * from pg_stat_replication ;
> pid | usesysid | usename | application_name | client_addr |
> client_hostname | client_port | backend_start | backend_xmin | state
> | sent_location | write_location | flush_location | replay_location |
> sync_priority | sync_state
> -----+----------+---------+------------------+-------------+
> -----------------+-------------+---------------+--------------+-------
> +---------------+----------------+----------------+---------
> --------+---------------+------------
> (0 rows)
>
>    Does we have to re-initiate the replication every time on postgres if
> we restart either the Master/Slave Server. If so how can I re-initiate the
> replication.
>
> Please let me know your thoughts on this.
>
> Thank You,
> Sajan Gone
> Database Administrator
> L Brands
> Mobile #: 517-990-5282 <(517)%20990-5282>
> Office #: 614-577-7622 <(614)%20577-7622>
>
> From: Samed YILDIRIM <samed@reddoc.net>
> Date: Friday, April 14, 2017 at 10:34 AM
> To: Sajan Gone <sgone@lb.com>, "pgsql-admin@postgresql.org" <
> pgsql-admin@postgresql.org>
> Subject: Re: [ADMIN] Postgres replication
>
> Hi Sajan,
>
> You can use following query.
>
> select * from pg_stat_replication;
>
> Best regards.
> Samed YILDIRIM
>
>
>
> 14.04.2017, 17:20, "Gone, Sajan" <sgone@lb.com>:
>
> Hi Samed,
>
>   Thanks for sending out the weblink. I was able to successfully set the
> replication up (Master/Slave, Hot stand by).
>
> I really appreciate your help on this.
>
> 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).
>
> Thank You,
> Sajan Gone.
> *From: *Samed YILDIRIM <samed@reddoc.net>
> *Date: *Thursday, April 13, 2017 at 4:27 PM
> *To: *Sajan Gone <sgone@lb.com>, "pgsql-admin@postgresql.org" <
> pgsql-admin@postgresql.org>
> *Subject: *Re: [ADMIN] Postgres replication
>
> Hi Sajan,
>
> You can take a look following document. It is good for a start point.
>
> https://www.digitalocean.com/community/tutorials/how-to-
> set-up-master-slave-replication-on-postgresql-on-an-ubuntu-12-04-vps
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.digitalocean.com_community_tutorials_how-2D...;
>
> Best regards.
>
> 22:25, 13 Nisan 2017, "Gone, Sajan" <sgone@lb.com>:
>
>
>
>
>
>
> Hello,
>
>
>
> Good afternoon everyone.
>
>
>
>
>   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
> it.  As of now I am following the standard postgres documentation @
> https://www.postgresql.org/docs/current/static/warm-
> standby.html#PREPARING-MASTER-FOR-STANDBY
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__www.postgresql.org_docs_current_static_warm-2Ds...;
> ,
> however it is slightly difficult for me to understand.
>
>
>
>
> 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
> or study materials on postgres replication would be highly appreciated.
>
>
>
>
> Many Thanks in advance.
>
>
>
>
>
> Thank You,
>
> Sajan Gone
>
>
>
>
>
>
> ------------------------------
>
>
>
> 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.
>
>
>
>
>
>
> ------------------------------
>
> 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.
>
>
> ------------------------------
>
> 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.
>

^ permalink  raw  reply  [nested|flat] 26+ messages in thread

* Re: Postgres - Replication
@ 2017-07-12 08:26  Om Prakash Jaiswal <op12om@yahoo.co.in>
  0 siblings, 0 replies; 26+ messages in thread

From: Om Prakash Jaiswal @ 2017-07-12 08:26 UTC (permalink / raw)
  To: bcc5226@gmail.com <bcc5226@gmail.com>; +Cc: pgsql-admin

Bacardo asynchronous tool is very good for master master as well as geographical distributed location.
RegardsOm Prakash.

Sent from Yahoo Mail on Android 
 
  On Tue, 21 Mar 2017 at 19:16, Poul Kristensen<bcc5226@gmail.com> wrote:   If you redirect you syslog to another server, the "pg_log" will be written in/var/log/... and pg_log will just write that it has been redirected.
/Poul


2017-03-21 12:07 GMT+01:00 Michael@sqlexec.com <michael@sqlexec.com>:

BDR works fine for writeloads that are geographically separate.  True multi-master is ACID compliant when you have a global transaction manager like Postgres-xc or Postgres-xl.
Regards

Sent from my iPad
On Mar 21, 2017, at 4:07 AM, Om Prakash Jaiswal <op12om@yahoo.co.in> wrote:


I am using Bucardo.It is working fine. It has been runinning for 5 years across 50 replicated nodes.I strongly recommend Bucardo for master-master replication.It is trigger based asynchronous replication system.
RegardsOm Prakash
 

    On Saturday, 18 March 2017 10:24 PM, Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com> wrote:
 

 I have some experience with BDR. Works fine.

Alvaro Aguayo
Jefe de Operaciones
Open Comb Systems E.I.R.L.

Oficina: (+51-1) 3377813 | RPM: #034252 / (+51) 995540103  | RPC: (+51) 954183248
Website: www.ocs.pe

----- Original Message -----
From: "bricklen" <bricklen@gmail.com>
To: "jasoninmel" <jasoninmel+1@gmail.com>
Cc: pgsql-admin@postgresql.org
Sent: Saturday, 18 March, 2017 11:41:48 AM
Subject: Re: [ADMIN] Postgres - Replication





On Thu, Mar 16, 2017 at 8:34 PM, jasoninmel < jasoninmel+1@gmail.com > wrote: 



Please note that I'm open for any other replication method that would allow 
better scalability. One of the best option would be to have Multi-master 
setup though I haven't seen any documentation around the support for such 
capability by Postgres. 


Postgresql doesn't support multi-master in the core project but there are options available. Have you come across BiDirectional Replication (BDR) yet? https://2ndquadrant.com/en/ resources/bdr/ 


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/ mailpref/pgsql-admin


   




-- 
Med venlig hilsen / Best regards
Poul Kristensen
Linux-OS/Virtualizationexpert and Oracle DBA  

^ permalink  raw  reply  [nested|flat] 26+ messages in thread


end of thread, other threads:[~2017-07-12 08:26 UTC | newest]

Thread overview: 26+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-01-10 07:38 Postgres replication nalini <nalini@nic.in>
2008-01-10 15:10 ` Kevin Kempter <kevin@kevinkempterllc.com>
2008-01-10 15:19 ` Scott Marlowe <scott.marlowe@gmail.com>
2008-01-11 11:39   ` nalini <nalini@nic.in>
2017-03-15 04:59 Postgres - Replication jasoninmel <jasoninmel+1@gmail.com>
2017-03-15 11:21 ` Re: Postgres - Replication Samed YILDIRIM <samed@reddoc.net>
2017-03-17 03:30   ` Re: Postgres - Replication jasoninmel <jasoninmel+1@gmail.com>
2017-03-17 03:34     ` Re: Postgres - Replication jasoninmel <jasoninmel+1@gmail.com>
2017-03-17 03:51       ` Re: Postgres - Replication Rosser Schwarz <rosser.schwarz@gmail.com>
2017-03-18 16:41       ` Re: Postgres - Replication bricklen <bricklen@gmail.com>
2017-03-18 16:54         ` Re: Postgres - Replication Alvaro Aguayo Garcia-Rada <aaguayo@opensysperu.com>
2017-03-21 03:36           ` Re: Postgres - Replication jasoninmel <jasoninmel+1@gmail.com>
2017-03-21 08:07           ` Re: Postgres - Replication Om Prakash Jaiswal <op12om@yahoo.co.in>
2017-03-21 11:07             ` Re: Postgres - Replication Michael@sqlexec.com <michael@sqlexec.com>
2017-03-21 13:44               ` Re: Postgres - Replication Poul Kristensen <bcc5226@gmail.com>
2017-04-13 19:23 Postgres replication Gone, Sajan <SGone@lb.com>
2017-04-13 20:27 ` Samed YILDIRIM <samed@reddoc.net>
2017-04-14 14:20   ` Gone, Sajan <SGone@lb.com>
2017-04-14 14:32     ` Keith <keith@keithf4.com>
2017-04-14 14:34     ` Samed YILDIRIM <samed@reddoc.net>
2017-04-17 12:52       ` Gone, Sajan <SGone@lb.com>
2017-04-17 14:12         ` Samed YILDIRIM <samed@reddoc.net>
2017-04-17 14:24           ` Gone, Sajan <SGone@lb.com>
2017-04-19 15:00 Postgres replication Gone, Sajan <SGone@lb.com>
2017-04-19 15:53 ` John Scalia <jayknowsunix@gmail.com>
2017-07-12 08:26 Re: Postgres - Replication Om Prakash Jaiswal <op12om@yahoo.co.in>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox