{"id":13510633,"url":"https://github.com/ClusterLabs/PAF","last_synced_at":"2025-03-30T16:34:20.329Z","repository":{"id":3861794,"uuid":"51014260","full_name":"ClusterLabs/PAF","owner":"ClusterLabs","description":"PostgreSQL Automatic Failover: High-Availibility for Postgres, based on Pacemaker and Corosync.","archived":false,"fork":false,"pushed_at":"2024-06-13T10:03:18.000Z","size":2508,"stargazers_count":337,"open_issues_count":22,"forks_count":55,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-08-02T02:16:55.949Z","etag":null,"topics":["failover","high-availability","pacemaker","paf","postgres","postgresql","resource-agent"],"latest_commit_sha":null,"homepage":"http://clusterlabs.github.io/PAF/","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClusterLabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-03T16:45:11.000Z","updated_at":"2024-07-12T18:43:15.000Z","dependencies_parsed_at":"2024-06-13T12:43:35.116Z","dependency_job_id":"1168a438-a46b-44df-aa61-994bbdba5e1b","html_url":"https://github.com/ClusterLabs/PAF","commit_stats":{"total_commits":220,"total_committers":18,"mean_commits":"12.222222222222221","dds":0.1454545454545455,"last_synced_commit":"d191e09a321801bf4c465768cfc75719512c9f59"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2FPAF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2FPAF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2FPAF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClusterLabs%2FPAF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClusterLabs","download_url":"https://codeload.github.com/ClusterLabs/PAF/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222566739,"owners_count":17004237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["failover","high-availability","pacemaker","paf","postgres","postgresql","resource-agent"],"created_at":"2024-08-01T02:01:47.822Z","updated_at":"2024-11-01T11:30:48.680Z","avatar_url":"https://github.com/ClusterLabs.png","language":"Perl","readme":"# PostgreSQL Automatic Failover\n\nHigh-Availibility for Postgres, based on industry references Pacemaker and\nCorosync.\n\n## Description\n\nPacemaker is nowadays the industry reference for High Availability. In the same\nfashion than for Systemd, all Linux distributions moved (or are moving) to this\nunique Pacemaker+Corosync stack, removing all other existing high availability\nstacks (CMAN, RGManager, OpenAIS, ...). It is able to detect failure on various\nservices and automatically decide to failover the failing resource to another\nnode when possible.\n\nTo be able to manage a specific service resource, Pacemaker interact with it\nthrough a so-called \"Resource Agent\". Resource agents must comply to the OCF\nspecification which define what they must implement (start, stop, promote,\netc), how they should behave and inform Pacemaker of their results.\n\nPostgreSQL Automatic Failover is a new OCF resource Agent dedicated to\nPostgreSQL. Its original wish is to keep a clear limit between the Pacemaker\nadministration and the PostgreSQL one, to keep things simple, documented and\nyet powerful.\n\nOnce your PostgreSQL cluster built using internal streaming replication, PAF is\nable to expose to Pacemaker what is the current status of the PostgreSQL\ninstance on each node: master, slave, stopped, catching up, etc. Should a\nfailure occurs on the master, Pacemaker will try to recover it by default.\nShould the failure be non-recoverable, PAF allows the slaves to be able to\nelect the best of them (the closest one to the old master) and promote it as\nthe new master. All of this thanks to the robust, feature-full and most\nimportantly experienced project: Pacemaker.\n\nFor information about how to install this agent, see `INSTALL.md`.\n\n## Setup and requirements\n\nPAF supports PostgreSQL 9.3 and higher. It has been extensively tested under\nCentOS 6 and 7 in various scenario.\n\nPAF has been written to give to the administrator the maximum control\nover their PostgreSQL configuration and architecture. Thus, you are 100%\nresponsible for the master/slave creations and their setup. The agent\nwill NOT edit your setup. It only requires you to follow these pre-requisites:\n\n  * slave __must__ be in hot_standby (accept read-only connections) ;\n  * the following parameters __must__ be configured in the appropriate place :\n    * `standby_mode = on` (for PostgreSQL 11 and before)\n    * `recovery_target_timeline = 'latest'`\n    * `primary_conninfo` wih `application_name` set to the node name as seen\n      in Pacemaker.\n  * these last parameters has been merged inside the instance configuration\n    file with PostgreSQL 12. For PostgreSQL 11 and before, you __must__\n    provide a `recovery.conf` template file.\n\nWhen setting up the resource in Pacemaker, here are the available parameters you\ncan set:\n\n  * `bindir`: location of the PostgreSQL binaries (default: `/usr/bin`)\n  * `pgdata`: location of the PGDATA of your instance (default:\n    `/var/lib/pgsql/data`)\n  * `datadir`: path to the directory set in `data_directory` from your\n    postgresql.conf file. This parameter has same default than PostgreSQL\n    itself: the `pgdata` parameter value. Unless you have a special PostgreSQL\n    setup and you understand this parameter, __ignore it__\n  * `pghost`: the socket directory or IP address to use to connect to the\n    local instance (default: `/tmp` or `/var/run/postgresql` for DEBIAN)\n  * `pgport`:  the port to connect to the local instance (default: `5432`)\n  * `recovery_template`: __only__ for PostgreSQL 11 and before. The local \n    template that will be copied as the `PGDATA/recovery.conf` file. This\n    file must not exist on any node for PostgreSQL 12 and after.\n    (default: `$PGDATA/recovery.conf.pcmk`)\n  * `start_opts`: Additional arguments given to the postgres process on startup.\n    See \"postgres --help\" for available options. Useful when the postgresql.conf\n    file is not in the data directory (PGDATA), eg.:\n    `-c config_file=/etc/postgresql/9.3/main/postgresql.conf`\n  * `system_user`: the system owner of your instance's process (default:\n    `postgres`)\n  * `maxlag`: maximum lag allowed on a standby before we set a negative master\n    score on it. The calculation is based on the difference between the current\n    xlog location on the master and the write location on the standby.\n    (default: 0, which disables this feature)\n\nFor a demonstration about how to setup a cluster, see\n[http://clusterlabs.github.io/PAF/documentation.html](http://clusterlabs.github.io/PAF/documentation.html).\n\n","funding_links":[],"categories":["Perl","postgresql","HA/Failover/Sharding","Compiled list","High-Availability"],"sub_categories":["Zabbix","plv8:"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClusterLabs%2FPAF","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FClusterLabs%2FPAF","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClusterLabs%2FPAF/lists"}