All Projects → ClusterLabs → Paf

ClusterLabs / Paf

Licence: other
PostgreSQL Automatic Failover: High-Availibility for Postgres, based on Pacemaker and Corosync.

Programming Languages

perl
6916 projects

Projects that are alternatives of or similar to Paf

Postgresql cluster
PostgreSQL High-Availability Cluster (based on "Patroni" and "DCS(etcd)"). Automating deployment with Ansible.
Stars: ✭ 294 (+2.08%)
Mutual labels:  postgresql, postgres, high-availability, failover
Patroni
A template for PostgreSQL High Availability with Etcd, Consul, ZooKeeper, or Kubernetes
Stars: ✭ 4,434 (+1439.58%)
Mutual labels:  postgresql, high-availability, failover
Ansible Role Patroni
🐘 Ansible Role for Patroni
Stars: ✭ 40 (-86.11%)
Mutual labels:  postgresql, high-availability, failover
Repmgr
A lightweight replication manager for PostgreSQL (Postgres) - latest version 5.2.1 (2020-12-07)
Stars: ✭ 1,207 (+319.1%)
Mutual labels:  postgresql, postgres, failover
Pg auto failover
Postgres extension and service for automated failover and high-availability
Stars: ✭ 564 (+95.83%)
Mutual labels:  postgresql, postgres, high-availability
Postgres Operator
Production PostgreSQL for Kubernetes, from high availability Postgres clusters to full-scale database-as-a-service.
Stars: ✭ 2,166 (+652.08%)
Mutual labels:  postgresql, postgres, high-availability
Dbq
Zero boilerplate database operations for Go
Stars: ✭ 273 (-5.21%)
Mutual labels:  postgresql, postgres
Spring Boot Postgresql Jpa Hibernate Rest Api Demo
Building RESTful APIs with Spring Boot, PostgreSQL, JPA and Hibernate
Stars: ✭ 209 (-27.43%)
Mutual labels:  postgresql, postgres
Postgui
A React web application to query and share any PostgreSQL database.
Stars: ✭ 260 (-9.72%)
Mutual labels:  postgresql, postgres
Massive Js
A data mapper for Node.js and PostgreSQL.
Stars: ✭ 2,521 (+775.35%)
Mutual labels:  postgresql, postgres
Embedded Database Spring Test
A library for creating isolated embedded databases for Spring-powered integration tests.
Stars: ✭ 196 (-31.94%)
Mutual labels:  postgresql, postgres
Activerecord Postgres enum
Integrate PostgreSQL's enum data type into ActiveRecord's schema and migrations.
Stars: ✭ 227 (-21.18%)
Mutual labels:  postgresql, postgres
Prest
PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new
Stars: ✭ 3,023 (+949.65%)
Mutual labels:  postgresql, postgres
Postgres
🐘 Run PostgreSQL in Kubernetes
Stars: ✭ 205 (-28.82%)
Mutual labels:  postgresql, postgres
Realtime
Listen to your to PostgreSQL database in realtime via websockets. Built with Elixir.
Stars: ✭ 4,278 (+1385.42%)
Mutual labels:  postgresql, postgres
Pg chameleon
MySQL to PostgreSQL replica system
Stars: ✭ 274 (-4.86%)
Mutual labels:  postgresql, postgres
Amazonriver
amazonriver 是一个将postgresql的实时数据同步到es或kafka的服务
Stars: ✭ 198 (-31.25%)
Mutual labels:  postgresql, postgres
Sqliterally
Lightweight SQL query builder
Stars: ✭ 231 (-19.79%)
Mutual labels:  postgresql, postgres
Wasmer Postgres
💽🕸 Postgres library to run WebAssembly binaries.
Stars: ✭ 245 (-14.93%)
Mutual labels:  postgresql, postgres
Rpostgres
A DBI-compliant interface to PostgreSQL
Stars: ✭ 245 (-14.93%)
Mutual labels:  postgresql, postgres

PostgreSQL Automatic Failover

High-Availibility for Postgres, based on industry references Pacemaker and Corosync.

Description

Pacemaker is nowadays the industry reference for High Availability. In the same fashion than for Systemd, all Linux distributions moved (or are moving) to this unique Pacemaker+Corosync stack, removing all other existing high availability stacks (CMAN, RGManager, OpenAIS, ...). It is able to detect failure on various services and automatically decide to failover the failing resource to another node when possible.

To be able to manage a specific service resource, Pacemaker interact with it through a so-called "Resource Agent". Resource agents must comply to the OCF specification which define what they must implement (start, stop, promote, etc), how they should behave and inform Pacemaker of their results.

PostgreSQL Automatic Failover is a new OCF resource Agent dedicated to PostgreSQL. Its original wish is to keep a clear limit between the Pacemaker administration and the PostgreSQL one, to keep things simple, documented and yet powerful.

Once your PostgreSQL cluster built using internal streaming replication, PAF is able to expose to Pacemaker what is the current status of the PostgreSQL instance on each node: master, slave, stopped, catching up, etc. Should a failure occurs on the master, Pacemaker will try to recover it by default. Should the failure be non-recoverable, PAF allows the slaves to be able to elect the best of them (the closest one to the old master) and promote it as the new master. All of this thanks to the robust, feature-full and most importantly experienced project: Pacemaker.

For information about how to install this agent, see INSTALL.md.

Setup and requirements

PAF supports PostgreSQL 9.3 and higher. It has been extensively tested under CentOS 6 and 7 in various scenario.

PAF has been written to give to the administrator the maximum control over their PostgreSQL configuration and architecture. Thus, you are 100% responsible for the master/slave creations and their setup. The agent will NOT edit your setup. It only requires you to follow these pre-requisites:

  • slave must be in hot_standby (accept read-only connections) ;
  • the following parameters must be configured in the appropriate place :
    • standby_mode = on (for PostgreSQL 11 and before)
    • recovery_target_timeline = 'latest'
    • primary_conninfo wih application_name set to the node name as seen in Pacemaker.
  • these last parameters has been merged inside the instance configuration file with PostgreSQL 12. For PostgreSQL 11 and before, you must provide a recovery.conf template file.

When setting up the resource in Pacemaker, here are the available parameters you can set:

  • bindir: location of the PostgreSQL binaries (default: /usr/bin)
  • pgdata: location of the PGDATA of your instance (default: /var/lib/pgsql/data)
  • datadir: path to the directory set in data_directory from your postgresql.conf file. This parameter has same default than PostgreSQL itself: the pgdata parameter value. Unless you have a special PostgreSQL setup and you understand this parameter, ignore it
  • pghost: the socket directory or IP address to use to connect to the local instance (default: /tmp or /var/run/postgresql for DEBIAN)
  • pgport: the port to connect to the local instance (default: 5432)
  • recovery_template: only for PostgreSQL 11 and before. The local template that will be copied as the PGDATA/recovery.conf file. This file must not exist on any node for PostgreSQL 12 and after. (default: $PGDATA/recovery.conf.pcmk)
  • start_opts: Additional arguments given to the postgres process on startup. See "postgres --help" for available options. Useful when the postgresql.conf file is not in the data directory (PGDATA), eg.: -c config_file=/etc/postgresql/9.3/main/postgresql.conf
  • system_user: the system owner of your instance's process (default: postgres)
  • maxlag: maximum lag allowed on a standby before we set a negative master score on it. The calculation is based on the difference between the current xlog location on the master and the write location on the standby. (default: 0, which disables this feature)

For a demonstration about how to setup a cluster, see http://clusterlabs.github.io/PAF/documentation.html.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].