repmgr | A lightweight replication manager for PostgreSQL | Key Value Database library

 by   EnterpriseDB C Version: v5.4.0 License: Non-SPDX

kandi X-RAY | repmgr Summary

kandi X-RAY | repmgr Summary

repmgr is a C library typically used in Database, Key Value Database, Docker applications. repmgr has no bugs, it has no vulnerabilities and it has medium support. However repmgr has a Non-SPDX License. You can download it from GitHub.

repmgr is a suite of open-source tools to manage replication and failover within a cluster of PostgreSQL servers. It enhances PostgreSQL’s built-in replication capabilities with utilities to set up standby servers, monitor replication, and perform administrative tasks such as failover or switchover operations. The most recent repmgr version (5.2.1) supports all PostgreSQL versions from 9.5 to 13. PostgreSQL 9.4 is also supported, with some restrictions. repmgr is distributed under the GNU GPL 3 and maintained by EnterpriseDB.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              repmgr has a medium active ecosystem.
              It has 1394 star(s) with 241 fork(s). There are 153 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 122 open issues and 536 have been closed. On average issues are closed in 84 days. There are 11 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of repmgr is v5.4.0

            kandi-Quality Quality

              repmgr has no bugs reported.

            kandi-Security Security

              repmgr has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              repmgr has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              repmgr releases are available to install and integrate.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of repmgr
            Get all kandi verified functions for this library.

            repmgr Key Features

            No Key Features are available at this moment for repmgr.

            repmgr Examples and Code Snippets

            No Code Snippets are available at this moment for repmgr.

            Community Discussions

            QUESTION

            Workaround for repmgr of PostgreSQL in Windows Server OS 2019
            Asked 2021-Apr-09 at 13:15

            I have been provided a VM on Windows Server OS 2019 for installing my web-app which uses PostgreSQL 9.6.6 as DBMS. As per the documentation at this link, there is There is no support for Microsoft Windows.

            Is there a workaround for configuring a "PostgreSQL Witness Server" with or without using repmgr?

            ...

            ANSWER

            Answered 2021-Apr-09 at 01:46

            I ain't sure But I think the solution to problem comes with PostgreSQL 9.6 installer. At the end of Installation, there is StackBuilder Option to Download additional packages. One of the package is for Downloading Slony.

            The documentation on Slony is available at this Link

            Source https://stackoverflow.com/questions/67013617

            QUESTION

            Postgresql Upgrade fails from version 11 to 12 with repmgr 4 to 5
            Asked 2021-Jan-18 at 07:03

            On Production server we have repmgr version 4 and upgraded it to version 5. Now doing upgrade of postgresql from 11 to 12. Getting error during the upgrade.

            pg_restore: error: could not execute query: ERROR: could not find function "am_bdr_failover_handler" in file "/usr/lib/postgresql/12/lib/repmgr.so" Command was: CREATE FUNCTION "repmgr"."am_bdr_failover_handler"(integer) RETURNS boolean LANGUAGE "c" STRICT AS '$libdir/repmgr', 'am_bdr_failover_handler';

            -- For binary upgrade, handle extension membership the hard way ALTER EXTENSION "repmgr" ADD FUNCTION "repmgr"."am_bdr_failover_handler"(integer);

            Any hint?

            ...

            ANSWER

            Answered 2021-Jan-18 at 07:03

            I found that repmgr versions are different for PostgreSQL 11 and PostgreSQL 12. Once I made it same, PostgreSQL upgrade 11 to 12 worked smoothly.

            Source https://stackoverflow.com/questions/65508091

            QUESTION

            repmgr standby switchover failed with ERROR: unable to connect via SSH to host "node IP", user ""
            Asked 2020-Sep-01 at 13:16

            repmgr standby switchover -v INFO: looking for configuration file in /etc INFO: configuration file found at: "/etc/repmgr.conf" NOTICE: executing switchover on node "DB-Test-02" (ID: 2) WARNING: unable to connect to remote host "IP" via SSH ERROR: unable to connect via SSH to host "IP", user ""

            repmgrd service is stopped on primary,standbyand witness server.

            I checked by connecting nodes from each other using SSH and that works.

            Any hint ?

            ...

            ANSWER

            Answered 2020-Sep-01 at 13:16

            For successful switchover paswword less SSH is required. Try this. https://tecadmin.net/password-less-ssh-login-setup/

            2nd is, need to set up below commands in /etc/sudoers file.

            Source https://stackoverflow.com/questions/63524155

            QUESTION

            Gitlab : Spawning error : "File is a symlink that does not point to a valid file (RuntimeError)"
            Asked 2020-May-14 at 12:23

            Having a working gitlab instance on an Ubuntu 18.04 server for abouth 2 months, it now refuse to swpan due to the following 2 errors in /var/log/nginx/error.log

            ...

            ANSWER

            Answered 2020-May-14 at 12:23

            This is almost certainly a permissions error.

            Make sure that whatever file is readable: chmod a+r /opt/gitlab/embedded/service/gitlab-rails/config/database.yml (according to the comments you already did this) AND

            Make sure that all the directories are executable, which for directories allows cd'ing into that directory:

            Source https://stackoverflow.com/questions/61587787

            QUESTION

            repmgrd and supervisord on docker - losing parent?
            Asked 2019-Dec-19 at 23:32

            I've created a Docker image with PostgreSQL and repmgrd, all launched with supervisor.

            My problem now is that when it's launched, the repmgrd spawned by supervisor seems to kind of die and another one is in its place. This leads to my inability to control it using supervisorctl and instead having to resolve to pkill or similar to manage it.

            Dockerfile

            ...

            ANSWER

            Answered 2019-Dec-19 at 23:32

            Updated answer based on the discussion in the comments:

            These are the issues with the current solution:

            1. The original command to start repmgrd:

              command = bash -c "sleep 10 && /usr/local/bin/repmgr_helper.sh"

              runs bash, which executes another bash script (that is another instance of bash), which then runs repmgrd, these are too many processes, most of them not needed

            2. supervisord wants that the invoked command remains in the foreground, but repmgrd by default daemonizes itself

            3. While troubleshooting there were some issues with the pid file generated by repmgrd

            These can be fixed by the following changes:

            1. The command to be used instead:

              command = /usr/local/bin/repmgr_helper.sh

            2. /usr/local/bin/repmgr_helper.sh needs to be updated to run sleep 10 as the first step

            3. /usr/local/bin/repmgr_helper.sh as the very last step should invoke repmgrd the following way:

              exec /path/to/repmgrd --daemonize=false --no-pid-file

              so, a. due to the exec it replaces the script it starts it b. it doesn't daemonize itself c. it doesn't generate a pid file.

            Original answer (before the updates)

            In the start command try passing --daemonize=false to repmgrd.

            Source https://stackoverflow.com/questions/59247554

            QUESTION

            PostgreSQL repmgr where to send queries
            Asked 2019-Oct-31 at 16:00

            I'm using Postgres 11.5 and docker. I have started 3 containers - 1 master and 2 slaves.

            pg-0 master:

            ...

            ANSWER

            Answered 2019-Oct-23 at 16:28

            What do i do when the master is changing to pg-1 or pg-2?

            If your python app is connected to master and master stops you should catch relevant exception and reconnect to the new master. I would suggest to add retries to re-connection attempts as new master election/manual promotion can take time. Of course, some logic should be added for detecting the new master in the app if your goal is to be connected to master only.

            The way i connect from python app is using the container name - host =pg-0 What do to when db master host name container changed ?

            The only case of container master hostname change i can think of is master container crash/stop. Then new master container goes up and app may reconnect to it as suggested above.

            Source https://stackoverflow.com/questions/58526404

            QUESTION

            Postgres 11 Standby never catches up
            Asked 2019-Feb-08 at 18:32

            Since upgrading to Postgres 11 I cannot get my production standby server to catch up. In the logs things look fine eventually:

            ...

            ANSWER

            Answered 2019-Feb-08 at 18:32

            I'm still not sure what the issue is/was, but I was able to get the standby caught up with these two changes:

            • set use_replication_slots=true in the repmgr config
            • set wal_compression=on in the postgres config

            Use replication slots didn't seem to change anything other than to cause replication_delay_gbytes to stay roughly flat. Turing on WAL compression did help, somehow, although I'm not entirely sure how. Yes, in theory it made it possible to ship WAL files to the standby faster, but reviewing network logs I see a drop in sent/received bytes that matches the effects of compression, so it seems to be shipping WAL files at the same speed just using less network.

            It still seems like there is some underlying issue at play here, though, because for example when I do pg_basebackup to create the standby it generates roughly 500 MB/s of network traffic, but then when it is streaming WALs after the standby finishes recovery it drops to ~250 MB/s without WAL compression and ~100 MB/s with WAL compression, but there is no decrease in network traffic after it caught up with WAL compression, so I'm not sure what's going on there that allowed it to catch up.

            Source https://stackoverflow.com/questions/54563710

            QUESTION

            Postgres transaction id wraparound for non-user tables
            Asked 2018-Dec-10 at 14:19

            I was at risk of hitting transaction id wraparound on a large Postgres 10 cluster due to a long-running transaction that was not idle (although it actually was in some sense, because it was stuck in the active state due to an issue with the Cassandra FDW that was being used in the query). I caught it in time and with prodigious use of vacuum freeze was able to get everything back under control...maybe.

            Everything looks fine at the database level:

            ...

            ANSWER

            Answered 2018-Dec-10 at 14:17

            The tables you show are all views, and the age of 2147483647 just reflects that relfrozenxid is 0 for them.

            Views have no tuples, and they need no VACUUM, so these are false positives.

            Can you determine what exactly causes the warning?

            There are things that block VACUUM and survive a restart: replication slots and prepared transactions.

            Your replication probably just fell behind, I don't think there is a direct connection to the transaction ID issue (but I can't be certain because you showed no log).

            Source https://stackoverflow.com/questions/53707144

            QUESTION

            ERROR could not access file "$libdir/repmgr_funcs" No such file or directory
            Asked 2018-Oct-12 at 14:14

            I follow this link to create master slave replication on Ubuntu postgresql server.

            My Configuration of repmgr and postgresql are:

            Postgresql 9.5-: /opt/PostgreSQL/9.5/

            repmgr-: /usr/lib/postgresql/9.5/bin/repmgr

            repmgr.conf -: /etc/rep.conf

            ...

            ANSWER

            Answered 2018-Oct-12 at 14:14

            If you are using repmgr ver. 4 and above then you need to change in postgresql.conf
            From shared_preload_libraries = 'repmgr_funcs'
            To shared_preload_libraries = 'repmgr'

            Below are their upgrade notes

            The repmgr shared library has been renamed from repmgr_funcs to repmgr, meaning shared_preload_libraries in postgresql.conf needs to be updated to the new name: shared_preload_libraries = 'repmgr'

            Source https://stackoverflow.com/questions/43515457

            QUESTION

            Postgresql 10 replication mode error
            Asked 2018-Apr-24 at 08:39

            I'm trying to setup a basic master slave configuration using streaming replication for postgres 10 and docker

            Since the official docker image provides a docker-entrypoint-initdb.d folder for placing initialization scripts i thought it would be a swell idea to start placing my preparation code here.

            What i'm trying to do is automate the way the database is restored before starting the slave in standby mode, so i run

            ...

            ANSWER

            Answered 2018-Apr-24 at 08:39

            To give an answer to my own question, the issue lied in how the dockerfile entrypoint scripts were called. Rather, they would end up starting the instance as a master or slave according to variables that were not properly set by me.

            Source https://stackoverflow.com/questions/49135319

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install repmgr

            You can download it from GitHub.

            Support

            The full repmgr documentation is available here:.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/EnterpriseDB/repmgr.git

          • CLI

            gh repo clone EnterpriseDB/repmgr

          • sshUrl

            git@github.com:EnterpriseDB/repmgr.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link