multiple configurations with repmgr

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

multiple configurations with repmgr

Did16

Hi

               We are going to use repmgr  with one node for the primary, one node for the standby and one node for the witness.

               It works fine with one project.

 

The problem is  that we want to have several other projects. Each one with its own primary node, its own standby node and the same witness node.

               Question : is it possible to do that ? One witness node which surveys several other nodes.

              

               Thanks in advance

 

Best Regards

cid:image002.png@01D14E0E.8515EB90


Didier ROS

Expertise SGBD

DS IT/IT DMA/Solutions Groupe EDF/Expertise Applicative - SGBD
Nanterre Picasso - E2 565D (aile nord-est)
32 Avenue Pablo Picasso
92000 Nanterre

 

 



Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.
____________________________________________________

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.

Reply | Threaded
Open this post in threaded view
|

Re: multiple configurations with repmgr

Nicolas Karolak
As far as i know, repmgr work at the "cluster" level so you would need
to run another postgres "cluster" instance (running on another port)
and another repmgrd instance (which would load a configuration
pointing to the new "cluster").

Regards,
Nicolas KAROLAK | Linux Systems Engineer
6-8, rue André Voguet - 94200 Ivry-sur-Seine
+33 1 77 56 77 96 | www.ubicast.eu | www.ubicast.tv

On Tue, Jan 8, 2019 at 5:17 PM ROS Didier <[hidden email]> wrote:

>
> Hi
>
>                We are going to use repmgr  with one node for the primary, one node for the standby and one node for the witness.
>
>                It works fine with one project.
>
>
>
> The problem is  that we want to have several other projects. Each one with its own primary node, its own standby node and the same witness node.
>
>                Question : is it possible to do that ? One witness node which surveys several other nodes.
>
>
>
>                Thanks in advance
>
>
>
> Best Regards
>
>
> Didier ROS
> Expertise SGBD
> DS IT/IT DMA/Solutions Groupe EDF/Expertise Applicative - SGBD
> Nanterre Picasso - E2 565D (aile nord-est)
> 32 Avenue Pablo Picasso
> 92000 Nanterre
>
>
>
>
>
>
> Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.
>
> Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.
>
> Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.
> ____________________________________________________
>
> This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.
>
> If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.
>
> E-mail communication cannot be guaranteed to be timely secure, error or virus-free.

Reply | Threaded
Open this post in threaded view
|

Re: multiple configurations with repmgr

Martín Marqués-2
In reply to this post by Did16
El 8/1/19 a las 13:17, ROS Didier escribió:

> Hi
>
>                We are going to use repmgr  with one node for the
> primary, one node for the standby and one node for the witness.
>
>                It works fine _with one project_.
>
>  
>
> The problem is  that we want to have several other projects. Each one
> with its own primary node, its own standby node and the _same witness node._
>
>                Question : is it possible to do that ? _One witness node_
> which surveys several other nodes.

Yes, you can accomplish that following the instructions below for
configuring the witness:

- Initialize the postgres server on the witness node
- Create one database for each cluster the witness will be managing
- Create the appropriate repmgr.conf files, one for each cluster managed
through this witness, and each with the appropriate conninfo setting so
they point to different databases.
- Run `repmgr witness register` multiple times, using different
configuration files on each run

Hope that helps clarify.

P.S.: This works on latest versions of repmgr. Before 3.3 the witness
was created through repmgr which made things harder to manage, reason
why that was removed in later versions

Cheers,

--
Martín Marqués                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services