pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Logical Replication - Rep Manager
7+ messages / 4 participants
[nested] [flat]

* Logical Replication - Rep Manager
@ 2020-08-25 13:55  Anjul Tyagi <anjul@ibosstech-us.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Anjul Tyagi @ 2020-08-25 13:55 UTC (permalink / raw)
  To: pgsql-admin

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

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

* Re: Logical Replication - Rep Manager
@ 2020-08-26 06:50  Samed YILDIRIM <samed@reddoc.net>
  parent: Anjul Tyagi <anjul@ibosstech-us.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Samed YILDIRIM @ 2020-08-26 06:50 UTC (permalink / raw)
  To: Anjul Tyagi <anjul@ibosstech-us.com>; pgsql-admin

<div><div>Hi Anjul,</div><div> </div><div>I haven't tested, but specifying multiple host in connection string may solve your issue.</div><div> </div><div>For example;</div><div>create subscription sub1</div><div>      connection 'host=192.168.100.25,192.168.100.50,192.168.56.20 dbname=prod_db user=logical_rep password=123'</div><div>      publication pub_for_report;</div><div> </div><div><a href="https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS">https://www.postg... regards.</div><div>Samed YILDIRIM</div><div> </div><div>25.08.2020, 20:34, "Anjul Tyagi" &lt;anjul@ibosstech-us.com&gt;:</div><blockquote><div style="font-family:'calibri';font-size:11pt"><div>Hi Team,</div><div> </div><div>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.</div><div> </div><div>Thanks in advance. </div><div> </div><div><div><div style="font-family:'tahoma'"><div> </div><div> </div><div> </div><div><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0in 0in 0pt 0in"><span lang="EN-IN" style="color:#222a35">Regards,</span></p><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0in 0in 0pt 0in"><span lang="EN-IN" style="color:#222a35">Anjul <strong>TYAGI</strong></span></p><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0in 0in 0pt 0in"><strong><span lang="EN-IN" style="color:#17365d"> </span></strong></p><p style="font-family:'calibri' , sans-serif;font-size:11pt;margin:0in 0in 0pt 0in"><strong><span lang="EN-GB" style="color:green;font-family:'webdings';font-size:16pt">ü</span><span lang="EN-GB" style="color:green"> </span><span style="color:green;font-size:7.5pt">Go Green</span></strong></p></div></div></div></div><div> </div></div></blockquote>

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

* Re: Logical Replication - Rep Manager
@ 2020-08-26 12:23  Anjul Tyagi <anjul@ibosstech-us.com>
  parent: Samed YILDIRIM <samed@reddoc.net>
  0 siblings, 1 reply; 7+ messages in thread

From: Anjul Tyagi @ 2020-08-26 12:23 UTC (permalink / raw)
  To: Samed YILDIRIM <samed@reddoc.net>; pgsql-admin

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;
>
>https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS
>
>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
>>
>>

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

* Re: Logical Replication - Rep Manager
@ 2020-08-27 16:57  Matthew Tice <mjtice@gmail.com>
  parent: Anjul Tyagi <anjul@ibosstech-us.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Matthew Tice @ 2020-08-27 16:57 UTC (permalink / raw)
  To: ; +Cc: pgsql-admin

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;
>
> https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS
>
> 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*
>
>
>

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

* Re: Logical Replication - Rep Manager
@ 2020-08-28 02:58  Naveen Kumar <naveenchowdaryon@gmail.com>
  parent: Matthew Tice <mjtice@gmail.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Naveen Kumar @ 2020-08-28 02:58 UTC (permalink / raw)
  To: Matthew Tice <mjtice@gmail.com>; +Cc: pgsql-admin

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;
>>
>> https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS
>>
>> 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*
>>
>>
>>

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

* Re: Logical Replication - Rep Manager
@ 2020-08-28 05:23  Anjul Tyagi <anjul@ibosstech-us.com>
  parent: Matthew Tice <mjtice@gmail.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Anjul Tyagi @ 2020-08-28 05:23 UTC (permalink / raw)
  To: Matthew Tice <mjtice@gmail.com>; +Cc: pgsql-admin

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;
>>>
>>>https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS
>>>
>>>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
>>>>
>>>>

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

* Re: Logical Replication - Rep Manager
@ 2020-08-28 05:24  Anjul Tyagi <anjul@ibosstech-us.com>
  parent: Naveen Kumar <naveenchowdaryon@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: Anjul Tyagi @ 2020-08-28 05:24 UTC (permalink / raw)
  To: Naveen Kumar <naveenchowdaryon@gmail.com>; Matthew Tice <mjtice@gmail.com>; +Cc: pgsql-admin

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;
>>>>
>>>>https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS
>>>>
>>>>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
>>>>>
>>>>>

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


end of thread, other threads:[~2020-08-28 05:24 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 13:55 Logical Replication - Rep Manager Anjul Tyagi <anjul@ibosstech-us.com>
2020-08-26 06:50 ` Samed YILDIRIM <samed@reddoc.net>
2020-08-26 12:23   ` Anjul Tyagi <anjul@ibosstech-us.com>
2020-08-27 16:57     ` Matthew Tice <mjtice@gmail.com>
2020-08-28 02:58       ` Naveen Kumar <naveenchowdaryon@gmail.com>
2020-08-28 05:24         ` Anjul Tyagi <anjul@ibosstech-us.com>
2020-08-28 05:23       ` Anjul Tyagi <anjul@ibosstech-us.com>

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