Posts

Showing posts from 2024

PostgreSQL pg_autoctl / pg_atuo_failover commands

  configuration related commands: -bash-4.2$ pg_autoctl config check 16:25:57 30701 INFO  Postgres setup for PGDATA "/var/lib/pgsql/14/data" is ok, running with PID 5432 and port 3193 16:25:57 30701 INFO  Connection to local Postgres ok, using "port=5432 dbname=pg_auto_failover host=/run/postgresql user=autoctl_node" pgdata:                /var/lib/pgsql/14/data pg_ctl:                /usr/pgsql-14/bin/pg_ctl pg_version:            "14.11" (1411) pghost:                /run/postgresql pgport:                5432 proxyport:             0 pid:    ...

PostgreSQL replication commands

  How to get the master database details from replica server? using a veiw pg_stat_wal_receiver we can get the master database details.   postgres=# select * from pg_stat_wal_receiver; -[ RECORD 1 ]---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pid                   | 29104 status                | streaming receive_start_lsn     | 0/9000000 receive_start_tli     | 6 written_lsn           | 0/9000520 flushed_lsn...

Configure High Availability using Autofailover Extension PostgreSQL14

  ************************************************************************* Replication configuration using Auto-failover Extension PostgreSQL 14 ************************************************************************* My current environment configuration: admin/monitor node    : 172.20.10.100 Master db                      : 172.20.10.102 Standy01                   : 172.20.10.103 Standby02                     : 172.20.10.104 Install auto-failover software on all the 4 nodes using root **************************************************| # wget https://install.citusdata.com/community/rpm.sh .  <--- it will create repository [root@admin01 ~]# chmod 777 rpm.sh [root@admin01 ~]# ./rpm.sh Detected operating syst...