0

I've set up a replica of a Postgresql instance using repmgr, and the replica is totally in sync with the master instance and have been in sync since some days, but repmgr tells me replica isn't connected.
This is what the cluster looks like:

postgres@www:~$ repmgr cluster show
 ID | Name             | Role    | Status    | Upstream    | Location | Connection string
----+------------------+---------+-----------+-------------+---------+------------------------------------------------------------------
 1  | orig_master      | primary | * running |             | default  | host=MASTER user=USER dbname=repmgr connect_timeout=2
 2  | orig_slave       | standby |   running | orig_master | default  | host=SLAVE user=USER dbname=repmgr connect_timeout=2

This is what we get on the replica instance:

postgres@db:~$ repmgr node status
Node "orig_slave":
    PostgreSQL version: 9.6.11
    Total data size: 5603 MB
    Conninfo: host=SLAVE user=USER dbname=repmgr connect_timeout=2
    Role: standby
    WAL archiving: disabled (on standbys "archive_mode" must be set to "always" to be effective)
    Archive command: rsync -a %p barman@BARMAN:/mnt/volume/prod/incoming/%f
    WALs pending archiving: 0 pending files
    Replication connections: 0 (of maximal 6)
    Replication slots: disabled
    Upstream node: orig_master (ID: 1)
    Replication lag: 0 seconds
    Last received LSN: 63/BB0E3C10
    Last replayed LSN: 63/BB0E3C10

Which clearly shows that we have no relpication lag and instances are in sync, and WAL numbers are correct too.
This is what I get on the master instance:

postgres@www:~$ repmgr node status
Node "orig_master":
    PostgreSQL version: 9.6.11
    Total data size: 5603 MB
    Conninfo: host=MASTER user=USER dbname=repmgr connect_timeout=2
    Role: primary
    WAL archiving: enabled
    Archive command: rsync -a %p barman@BARMAN:/mnt/volume/prod/incoming/%f
    WALs pending archiving: 0 pending files
    Replication connections: 1 (of maximal 6)
    Replication slots: disabled
    Replication lag: n/a

WARNING: following issue(s) were detected:
  - 1 of 1 downstream nodes not attached:
    - orig_slave (ID: 2)

HINT: execute "repmgr node check" for more details

Which tells me that downstream node isn't connected, which is clearly connected!
Now, my question is: Is there actually a problem in replication process? If yes, then What is it and how can I solve it? If not, how can I make repmgr sure that there is no problem?

P.S.: Postgresql 9.6.11, repmgr 4.2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.