Thread: Logical Replication - Rep Manager

Logical Replication - Rep Manager

From
"Anjul Tyagi"
Date:
Hi Team,

We are planning to implement the Rep Manager in our environment to manage the replication. While reading the documentation we found out that if primary goes down. We can promote one of the standby server and make it primary. However we have one reporting server that we are replicating specific table data via logical replication. While doing testing in lower environment, we noticed when we primary goes down and we promote the standby server, our replication also breaks. Do we have any option and suggestion to handle the logical replication in case of failure.

Thanks in advance. 

 
 
 

Regards,

Anjul TYAGI

 

ü Go Green


Re: Logical Replication - Rep Manager

From
"Anjul Tyagi"
Date:
Samed,

i tied the same, unfortunate it did not work. after promoting we have seen error log, replication slot is not exist. I tried to start the slot but did not work.

 
 
 

Regards,

Anjul TYAGI

 

ü Go Green


------ Original Message ------
From: "Samed YILDIRIM" <samed@reddoc.net>
To: "Anjul Tyagi" <anjul@ibosstech-us.com>; "pgsql-admin" <pgsql-admin@postgresql.org>
Sent: 8/26/2020 12:20:29 PM
Subject: Re: Logical Replication - Rep Manager

Hi Anjul,
 
I haven't tested, but specifying multiple host in connection string may solve your issue.
 
For example;
create subscription sub1
      connection 'host=192.168.100.25,192.168.100.50,192.168.56.20 dbname=prod_db user=logical_rep password=123'
      publication pub_for_report;
 
 
Best regards.
Samed YILDIRIM
 
25.08.2020, 20:34, "Anjul Tyagi" <anjul@ibosstech-us.com>:
Hi Team,
 
We are planning to implement the Rep Manager in our environment to manage the replication. While reading the documentation we found out that if primary goes down. We can promote one of the standby server and make it primary. However we have one reporting server that we are replicating specific table data via logical replication. While doing testing in lower environment, we noticed when we primary goes down and we promote the standby server, our replication also breaks. Do we have any option and suggestion to handle the logical replication in case of failure.
 
Thanks in advance. 
 
 
 
 

Regards,

Anjul TYAGI

 

ü Go Green

 

Re: Logical Replication - Rep Manager

From
Matthew Tice
Date:
Are you using a replication_slot?  

If so, as I understand, replication_slots are not replicated to the standby database.  They would need to be re-created upon standby promotion.

On Wed, Aug 26, 2020 at 6:23 AM Anjul Tyagi <anjul@ibosstech-us.com> wrote:
Samed,

i tied the same, unfortunate it did not work. after promoting we have seen error log, replication slot is not exist. I tried to start the slot but did not work.

 
 
 

Regards,

Anjul TYAGI

 

ü Go Green


------ Original Message ------
From: "Samed YILDIRIM" <samed@reddoc.net>
To: "Anjul Tyagi" <anjul@ibosstech-us.com>; "pgsql-admin" <pgsql-admin@postgresql.org>
Sent: 8/26/2020 12:20:29 PM
Subject: Re: Logical Replication - Rep Manager

Hi Anjul,
 
I haven't tested, but specifying multiple host in connection string may solve your issue.
 
For example;
create subscription sub1
      connection 'host=192.168.100.25,192.168.100.50,192.168.56.20 dbname=prod_db user=logical_rep password=123'
      publication pub_for_report;
 
 
Best regards.
Samed YILDIRIM
 
25.08.2020, 20:34, "Anjul Tyagi" <anjul@ibosstech-us.com>:
Hi Team,
 
We are planning to implement the Rep Manager in our environment to manage the replication. While reading the documentation we found out that if primary goes down. We can promote one of the standby server and make it primary. However we have one reporting server that we are replicating specific table data via logical replication. While doing testing in lower environment, we noticed when we primary goes down and we promote the standby server, our replication also breaks. Do we have any option and suggestion to handle the logical replication in case of failure.
 
Thanks in advance. 
 
 
 
 

Regards,

Anjul TYAGI

 

ü Go Green

 

Re: Logical Replication - Rep Manager

From
Naveen Kumar
Date:
Hello Anjul,

I did not test, You can try  

ALTER SUBSCRIPTION <mysub> DISABLE;
Promote Standby
ALTER SUBSCRIPTION name CONNECTION 'conninfo
ALTER SUBSCRIPTION <mysub> ENABLE;  

if it's working, you can automate this in promote_commad in repmgr.conf. 




Naveen Kumar .M,
Sr. PostgreSQL Database Administrator,
Mobile: 7755929449.



On Thu, Aug 27, 2020 at 10:28 PM Matthew Tice <mjtice@gmail.com> wrote:
Are you using a replication_slot?  

If so, as I understand, replication_slots are not replicated to the standby database.  They would need to be re-created upon standby promotion.

On Wed, Aug 26, 2020 at 6:23 AM Anjul Tyagi <anjul@ibosstech-us.com> wrote:
Samed,

i tied the same, unfortunate it did not work. after promoting we have seen error log, replication slot is not exist. I tried to start the slot but did not work.

 
 
 

Regards,

Anjul TYAGI

 

ü Go Green


------ Original Message ------
From: "Samed YILDIRIM" <samed@reddoc.net>
To: "Anjul Tyagi" <anjul@ibosstech-us.com>; "pgsql-admin" <pgsql-admin@postgresql.org>
Sent: 8/26/2020 12:20:29 PM
Subject: Re: Logical Replication - Rep Manager

Hi Anjul,
 
I haven't tested, but specifying multiple host in connection string may solve your issue.
 
For example;
create subscription sub1
      connection 'host=192.168.100.25,192.168.100.50,192.168.56.20 dbname=prod_db user=logical_rep password=123'
      publication pub_for_report;
 
 
Best regards.
Samed YILDIRIM
 
25.08.2020, 20:34, "Anjul Tyagi" <anjul@ibosstech-us.com>:
Hi Team,
 
We are planning to implement the Rep Manager in our environment to manage the replication. While reading the documentation we found out that if primary goes down. We can promote one of the standby server and make it primary. However we have one reporting server that we are replicating specific table data via logical replication. While doing testing in lower environment, we noticed when we primary goes down and we promote the standby server, our replication also breaks. Do we have any option and suggestion to handle the logical replication in case of failure.
 
Thanks in advance. 
 
 
 
 

Regards,

Anjul TYAGI

 

ü Go Green

 

Re: Logical Replication - Rep Manager

From
"Anjul Tyagi"
Date:
Matthew,

thanks for the information. Yes we are using the replication slot for that. 

is there any alternate for that?

 
 
 

Regards,

Anjul TYAGI

 

ü Go Green


------ Original Message ------
From: "Matthew Tice" <mjtice@gmail.com>
To:
Cc: "pgsql-admin" <pgsql-admin@postgresql.org>
Sent: 8/27/2020 10:27:54 PM
Subject: Re: Logical Replication - Rep Manager

Are you using a replication_slot?  

If so, as I understand, replication_slots are not replicated to the standby database.  They would need to be re-created upon standby promotion.

On Wed, Aug 26, 2020 at 6:23 AM Anjul Tyagi <anjul@ibosstech-us.com> wrote:
Samed,

i tied the same, unfortunate it did not work. after promoting we have seen error log, replication slot is not exist. I tried to start the slot but did not work.

 
 
 

Regards,

Anjul TYAGI

 

ü Go Green


------ Original Message ------
From: "Samed YILDIRIM" <samed@reddoc.net>
To: "Anjul Tyagi" <anjul@ibosstech-us.com>; "pgsql-admin" <pgsql-admin@postgresql.org>
Sent: 8/26/2020 12:20:29 PM
Subject: Re: Logical Replication - Rep Manager

Hi Anjul,
 
I haven't tested, but specifying multiple host in connection string may solve your issue.
 
For example;
create subscription sub1
      connection 'host=192.168.100.25,192.168.100.50,192.168.56.20 dbname=prod_db user=logical_rep password=123'
      publication pub_for_report;
 
 
Best regards.
Samed YILDIRIM
 
25.08.2020, 20:34, "Anjul Tyagi" <anjul@ibosstech-us.com>:
Hi Team,
 
We are planning to implement the Rep Manager in our environment to manage the replication. While reading the documentation we found out that if primary goes down. We can promote one of the standby server and make it primary. However we have one reporting server that we are replicating specific table data via logical replication. While doing testing in lower environment, we noticed when we primary goes down and we promote the standby server, our replication also breaks. Do we have any option and suggestion to handle the logical replication in case of failure.
 
Thanks in advance. 
 
 
 
 

Regards,

Anjul TYAGI

 

ü Go Green

 

Re: Logical Replication - Rep Manager

From
"Anjul Tyagi"
Date:
Naveen,

I will test that today and let you know. 

 
 
 

Regards,

Anjul TYAGI

 

ü Go Green


------ Original Message ------
From: "Naveen Kumar" <naveenchowdaryon@gmail.com>
To: "Matthew Tice" <mjtice@gmail.com>
Cc: "pgsql-admin" <pgsql-admin@postgresql.org>
Sent: 8/28/2020 8:28:33 AM
Subject: Re: Logical Replication - Rep Manager

Hello Anjul,

I did not test, You can try  

ALTER SUBSCRIPTION <mysub> DISABLE;
Promote Standby
ALTER SUBSCRIPTION name CONNECTION 'conninfo
ALTER SUBSCRIPTION <mysub> ENABLE;  

if it's working, you can automate this in promote_commad in repmgr.conf. 




Naveen Kumar .M,
Sr. PostgreSQL Database Administrator,
Mobile: 7755929449.



On Thu, Aug 27, 2020 at 10:28 PM Matthew Tice <mjtice@gmail.com> wrote:
Are you using a replication_slot?  

If so, as I understand, replication_slots are not replicated to the standby database.  They would need to be re-created upon standby promotion.

On Wed, Aug 26, 2020 at 6:23 AM Anjul Tyagi <anjul@ibosstech-us.com> wrote:
Samed,

i tied the same, unfortunate it did not work. after promoting we have seen error log, replication slot is not exist. I tried to start the slot but did not work.

 
 
 

Regards,

Anjul TYAGI

 

ü Go Green


------ Original Message ------
From: "Samed YILDIRIM" <samed@reddoc.net>
To: "Anjul Tyagi" <anjul@ibosstech-us.com>; "pgsql-admin" <pgsql-admin@postgresql.org>
Sent: 8/26/2020 12:20:29 PM
Subject: Re: Logical Replication - Rep Manager

Hi Anjul,
 
I haven't tested, but specifying multiple host in connection string may solve your issue.
 
For example;
create subscription sub1
      connection 'host=192.168.100.25,192.168.100.50,192.168.56.20 dbname=prod_db user=logical_rep password=123'
      publication pub_for_report;
 
 
Best regards.
Samed YILDIRIM
 
25.08.2020, 20:34, "Anjul Tyagi" <anjul@ibosstech-us.com>:
Hi Team,
 
We are planning to implement the Rep Manager in our environment to manage the replication. While reading the documentation we found out that if primary goes down. We can promote one of the standby server and make it primary. However we have one reporting server that we are replicating specific table data via logical replication. While doing testing in lower environment, we noticed when we primary goes down and we promote the standby server, our replication also breaks. Do we have any option and suggestion to handle the logical replication in case of failure.
 
Thanks in advance. 
 
 
 
 

Regards,

Anjul TYAGI

 

ü Go Green