Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pgpool not showing Replication State on RedHat #1280

Closed
przemyslavic opened this issue May 20, 2020 · 1 comment
Closed

Pgpool not showing Replication State on RedHat #1280

przemyslavic opened this issue May 20, 2020 · 1 comment

Comments

@przemyslavic
Copy link
Collaborator

przemyslavic commented May 20, 2020

Describe the bug
Pgpool does not show Replication State/Replication Sync State in RedHat environments.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy a cluster with 2 PostgreSQL vms and pgpool deployment enabled
  2. Run the command pcp_node_info -h localhost -U $PGPOOL_ADMIN_USERNAME -w --node-id=1 --verbose inside the pgpool pod.
  3. Run the command export PGPASSWORD=$(cat /opt/bitnami/pgpool/secrets/pgpool_sr_check_password) && psql -qAtX -h localhost -U $PGPOOL_SR_CHECK_USER -d postgres -c "show pool_nodes" inside the pgpool pod.

Expected behavior
Running the pcp_node_info -h localhost -U $PGPOOL_ADMIN_USERNAME -w --node-id=1 --verbose' command should show output similar to the following if everything is configured correctly:

   Hostname               : /tmp
   Port                   : 11003
   Status                 : 2
   Weight                 : 0.500000
   Status Name            : up
   Role                   : standby
   Replication Delay      : 0
   Replication State      : streaming
   Replication Sync State : async
   Last Status Change     : 2019-04-23 13:58:40

Actual behavior
The actual command result is as follows:

  Hostname               : ec2-xx-xx-xx-xx
  Port                   : 5432
  Status                 : 2
  Weight                 : 0.500000
  Status Name            : up
  Role                   : standby
  Replication Delay      : 0
  Replication State      : 
  Replication Sync State : 
  Last Status Change     : 2020-05-20 14:19:41

There is no information on Replication State and Replication Sync State for PostgreSQL installations on RedHat.

Same with the command
psql -h localhost -U $PGPOOL_SR_CHECK_USER -d postgres -c "show pool_nodes" that does not show values for the replication_state and replication_sync_state columns.

 node_id |      hostname      | port | status | lb_weight |  role   | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change
---------+--------------------+------+--------+-----------+---------+------------+-------------------+-------------------+-------------------+------------------------+---------------------
 0       | ec2-yy-yy-yy-yy    | 5432 | up     | 0.500000  | primary | 97         | false             | 0                 |                   |                        | 2020-05-20 14:19:41
 1       | ec2-xx-xx-xx-xx | 5432 | up     | 0.500000  | standby | 100        | true              | 0                 |                   |                        | 2020-05-20 14:19:41

Config files
Configuration that should be included in the yaml file:

...
    postgresql:
      count: 2
      machine: postgresql-machine-rhel
...
---
kind: infrastructure/virtual-machine
name: postgresql-machine-rhel
provider: aws
based_on: postgresql-machine
specification:
  os_full_name: RHEL-7.8_HVM_GA-20200225-x86_64-1-Hourly2-GP2
---
kind: configuration/postgresql
name: default
provider: aws
specification:
  extensions:
    pgaudit:
      enabled: yes
    pgbouncer:
      enabled: yes
    replication:
      enabled: yes
      use_repmgr: yes
title: Postgresql

OS (please complete the following information):

  • OS: [RHEL]

Cloud Environment (please complete the following information):

  • Cloud Provider [all]
@przemyslavic
Copy link
Collaborator Author

Now it works fine after fixing.
Checked:
epicli apply with 2 PostgreSQL vms clustered on AWS/Azure x Ubuntu/RHEL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants