Transcripción del informe / tutorial "Gestión de clústeres de PostgreSQL altamente disponibles con Patroni". A. Klyukin, A. Kukushkin
Patroni es una aplicación de Python para crear clústeres de PostgreSQL altamente accesibles basados en la replicación de transmisión. Es utilizado por compañías como Red Hat, IBM Compose, Zalando y muchas otras. Con su ayuda, puede transformar el sistema de los nodos maestro y esclavo (primario - réplica) en un clúster altamente accesible con soporte para conmutación controlada automática (conmutación) y de emergencia (conmutación por error). Patroni facilita la adición de nuevas réplicas a un clúster existente, admite cambios dinámicos de configuración de PostgreSQL simultáneamente en todos los nodos del clúster y muchas otras características, como la replicación síncrona, acciones personalizadas al cambiar de nodo, API REST, la capacidad de ejecutar comandos personalizados para crear una réplica en lugar de pg_basebackup, interacción con Kubernetes etc.
Los estudiantes de la clase magistral aprenderán en detalle cómo funciona Patroni, adquirirán habilidades prácticas para configurar grupos altamente accesibles basados en ella, se familiarizarán con varias características adicionales y participarán en el diagnóstico de problemas. Se tratarán los siguientes temas:
- alcance: qué tareas de HA se resuelven con éxito por Patroni
- revisión de arquitectura
- crear un clúster de prueba
- utilidad patronictl
- Cambio de configuración de PostgreSQL para el clúster gestionado Patroni
- Monitoreo API
- enfoques de cambio de cliente
- características adicionales: cambio manual, reinicio programado, modo de pausa
- configuración de replicación síncrona
- extensibilidad y versatilidad
- errores frecuentes y su diagnóstico

Al final hay una encuesta: "¿En cuántas publicaciones se debe dividir el tutorial? Por favor vote".
( ) ! , tutorial Patroni. . – . Zalando . Patroni. , . , , , , failover Patroni. - , , , .
$ git clone https://github.com/alexeyklyukin/patroni-training
$ cd patroni-training
$ vagrant up
$ vagrant ssh
$ sudo -iu postgres
$ cd patroni
$ ls
postgres0.yml postgres1.yml postgres2.yml
vagrant’. , , ( , ), vagrant GitHub, , vagrantfile. vagrant up vagrant ssh. , etcd, Postgres Patroni. , .
, . , , , , . . , , , Patroni.
Patroni , postgres-. , failover. Zalando . Patroni , postgres-. .

( ) . , , . failover. , , . , .
Patroni, , , .
, Patroni. , . , Patroni , .
, , Patroni , .
Patroni , . , failover, callback .
, -.
Patroni. , failover . , Patroni. .
, Patroni. , Patroni , , , point in time recovery .
, , Patroni GitHub. , .
. Patroni failover.

( ) ! Patroni, High Availability, , Postgres .
- - . - , . , , Postgres. , , DRDB LVM.
, , , Corosync, PaceMaker. . . PaceMaker , . , , . - - . , , , , .
, – . , Postgres 10- . trigger-based , , .
. , , , , . - , , , . - , , . . () .
, 2009- Postgres 9.0, . . , , High Availability .
, multi-master’ , . . BDR bucardo. , . BDR, bucardo . . - . . , . , . , . High Availability .

? . , standby , - .
, major versions.

: , primary. standby , . - , . , , standby .
. . - . . . , . , , standby - , , . ?

. split-brain .

. standby - .

, , ? -, . . , , . failover. , , . , , , , ? . . .

. , standby . , , , standby. , , . standby . split-brained.

. , , .
. , primary , . – . ? , , , , .
(: )
, . , , STONITH. - – « ».
Quorum . - , . .
Watchdog. , , , . , - Patroni, Watchdog . , Postgres .
, «Compose». Compose IBM. . , Postgres daemon`a, instance Postgres. - , lock, . lock' , .
Bot . , Postgres , , .

, . , . etcd . 30 . , ttl. , .

- , . , .

, , etcd. .

? , . - , . . WAL . , , , wal_position 100, . . . etcd.

etcd? , . . . , , , , .
, C , , B .

, C , promote Postgres. B , A, , C.

etcd. , , -, Patroni distributed consistency store, , Etcd, Consul, Zookeeper. Kybernetes API.
Etcd RAFT. , .
, etcd leader election, , , , .

Patroni . Patroni Python. Zalando, . , . . Cybertec. , Postages. Patroni .

( ) , Patroni . , , , High Availability .

. , . , vagrant. . vagrant ssh
, sudo -iu postgres
Patroni.
High Availability Patroni .
Patroni – . vagrant’ etcd. , instance etcd. production , , , instance etcd, etcd , . , . , , etcd production. , High Availability , Patroni .
Postgres, Patroni. yml-. yml-? GitHub, Patroni – open source , GitHub yml-. , , . . . git clone https://github.com/zalando/patroni.git
, , Python . .

C 26:33 dem.
. Postgres. Patroni. . patroni postgres0.yml
. Patroni. , Patroni.
Patroni , . -, initdb. Initdb . initdb. , . , , lock, . . , . : «lock owner: postgresql0; I om postgresql0», . . , , .
. patroni postgres1.yml
. ? etcd-. , . . etcd , . , initdb , pg_basebackup. Postgres, . .
. Postgres. Postgres . . , WAL-. , .
? , , Patroni . , Patroni . Postgres , . , - , wal-, . , wal-, . . .
Postgres , . . . , Postgres wal- . , .
, , , wal- . . , . Patroni . , , .
? , , Patroni . Patroni , . .
. , . Patroni, Postgres. «postgres1», postgres1 – . , Patroni - . . . , lock postgresql0, potstresql1, . . – , – , lock, . promote, , lock. Patroni . , , . . , , , Patroni , .
? . ? python-etcd. . . patroni-training, vagrant. pip install python-etcd
. etcd Patroni. , Patroni, . Patroni etcd .

? , Patronictl. Patronictl Patroni. .
? . Patroni «patronictl», . . . , , . . «list».
? . , «postgresql0» «postgresql1», , . , . , . , . Postgres, . . Postgres . (Lag) – , . , , . , Patroni Patronictl . , , .
, , failover. Patroni.

? , Patroni failover. . switchover, failover. Switchover – , - . , failover ( – ) – , - . , Patroni .
failover. ? Patroni . Patroni . «kill Patroni», «kill Patroni», Postgres. ctrl+Z, . . Patroni background , .
. . «ctrl+Z» . .
? . ? Patroni . etcd . . – 30 . «ttl». . . Patroni. 8 , 10 , . , , , failover. , 30 .
? . ? warning . Patroni «request failed», . . GET request. ? Patroni , lock’a etcd . . lock , Patroni . : « – ?». , Patroni wal’, . . .

, . . : « ?». , Patroni . , , promotion, . . . : promoted self to leader by acquiring session lock.
: Patroni ?
: , . .
, , . promotion.
: etcd Patroni?
: , . Etcd – , , , . – . etcd , . . , Patroni . , . , Postgres, etcd. - , etcd.
etcd, Patroni, Postgres, .
etcd , – , . etcd Postgres, etcd - . etcd , .
: etcd, network partition, . . ?
: network partition. etcd , . , , . , , . , , . .
, , promotion. . , , lock, postgres1 .
. , postgres0 , Patroni? Patroni, Postgres . Postgres .
, , , - . Postgres , split-brain, . . .
. , promotion . , , Patroni.
- . , split-brain. , Patroni split-brain.

? . , «split-brain». Postgres. . .
. . Patroni, . – . Patroni, , . , .

, – , . ? demoting Postgres , . . . Postgres – immediate shutdown . Postgres immediate shutdown. shutdown, . . , . . , demoting, . . promotion, lock’. Postgres.
crash recovery, immediate shutdown – . pg_rewind. Pg_rewind , . crash recovery mode single user. , single user . pg_rewind, Patroni , , promotion.
. . crash recovery. , wal-. wal- . , split-brain, – , , create table split-brain
. pg_rewind.
pg_rewind? Postgres, , . , , promotion.
. «running pg_rewind from postgresql1». Pg_rewind , split-brain, . , rewind, – done. , . , – postgresql1, – postgresql0. . . , , , split-brain (split-brain , Patroni, Patroni, split-brain ), . . . Patroni , . , pg_rewind .
Patronictl. , , postgreslq1. postgresql0, postgresql1. , , postgresql0 , , . . failover , Patroni .
: , ?
: . . . , , . . split-brain, . Patroni – split-brains, .
. . . . - . , . Patroni. . , .
? etcd. , . etcdctl. , etcd. Consul, ZooKeeper Kubernetes. .
Etcd – -. - . - . , , , . . postgresql0 porsgresql1. initialize, , , , . . . , - , . initialize , .

, . . , members/postgresql1. json, .
, url, Postgres. api_url, . . url, Patroni, promotion, Patroni – . . Patroni , . . xlog’ wal’ , . . wal-. timeline.
. history. , timeline history, , promotion , , . . , promotion. . . , failover.

, . , Postgres.

? . . , , postgresql.conf autosystem , , . , , - , . , shared_buffers max_connections . .
? , , maintenance_work_mem work_mem, Postgres , .
Patronictl. . – edit-config. . .
? «maintenance_work_mem» work_mem. Postgres, parameters. . – 128 MB.
. Patroni , , , ? , .

, . . , SIGHUP. , Postgres . SIGHUP maintenance_work_memory , 128 MB.
. SIGHUP 128 MB.
. . . , Patroni reloading . . . . Patroni .
Patronictl . .
. maintenance_work_mem , .

, , , . edit-config. maintenance_work_memory «max_connections». ? , postgres-. , max_connections, , .
Max_connection , .
max_connection – 101. , . . Max_connection , 101. , . , . - ? , .
? , Postgres. Patroni . , , , , . : « production ?». Patroni .

, ? Patroni. REST API. Patroni REST API, , , etcd.
. ? , – . . , , ? , «pending_restart» «true». . . pending_restart – . . «true». , , , , , .

, . , . , . . ?

Patronictl list , . Patronictl , . ?

Patronictl, . . Patroni «patronictl restart». , , . . , , . . postgresql1 postgresql2. production , failover, .
.
, . ? , . , . . . , .

– max_connections . «show max_connections». – 101. . 101. (: , max_connections 100) . . max_connections. Patroni . .
, . max_connections , max_connections . max_connections , , , . Patroni . Patroni .
. . , , max_connections , . Patroni , Postgres max_connections.
. . Batman – . , . - .

Patroni , , - .
Patroni. . . Postgres, Patroni , yml. : « , promotion?».
ttl, . . etcd . ttl .

, Patroni. Patroni , , - , , , . , , failover.

, . . , , «loop_wait». . . , .
, loop_wait , ttl? Patroni . , , , . promotion - . . . . , .
, ttl , loop_wait. , Patroni etcd, «demoting», etcd , , . retry_timeout.
, : ttl , loop_wait + 2 retry_timeout. , loop_wait, retry_timeout ttl.

? . . . loop_wait , ttl . loop_wait 10 , ttl 5. , Patroni . , .
«patronictl edit-config» ttl 5 , loop_wait 10 . , .

. , watchdog’, Patroni, , . watchdog, , . ? , .
Postgres . «acquired session lock as a leader». ? Patroni , , Patroni . , . . , . , , . . . .

, . , . . . . , REST API , , . , promotion. .
etcd . , . , «following a different leader», . . . etcd , , . . . . . . , . , .

, , , . . , , . . . , . , , . . , ttl , loop_wait + retry_timeout *2.
: , , ttl. ttl, , , . . loop_wait . , .
, , retry_timeout . , . retry_timeout - etcd, Patroni demoting . -, , , , ttl 60 , , switches . 30 . -, .

Patroni. , . Patroni. bootstrap . bootstrap ttl loop_wait, retry_timeout, . , Postgres.
bootstrap ? etcd, bootstrap etcd. . , ttl, loop_wait. . , , etcd .
, PostgreSQL «use_pg_rewind», , pg_rewind. Patroni, Postgres. Postgres. , . . . . , .
, , bootstrap Patroni, . Patronictl, . . etcd. Patronictl .
. . , , etcd , bootstrap, , . .
? Postgres? .
– patroni.yaml. bootstrap. , , PostgreSQL. PostgreSQL , , . . . Patroni - . . , , , 16 B , MB, 4 B shared buffers, 1 B. shared buffers. . . – Patroni . bootstrap, .

. etcd. etcd config. .
etcdctl ls / service/batman/config
. , etcd . Patroni.yaml, . . - . production, , , - .
- Postgres. alter system -.
. , etcd . , bootstrap, . , retry_timeout, Postgres. etcd - postgresql parameters. , , Patroni , Patroni, .
patronictl , . , json, patronictl yml, – . json – .
etcd. patroni.yaml, , etcd . . . work_mem etcd 16 MB, patroni.yaml 12 MB. Patroni.yaml . ? Patroni postgres’ , 12 MB. Alter System, , . . patroni.yaml etcd.
. . , , postgresql.conf, Patroni , . postgresql.conf. , . . , . Patroni.
include ‘postgresql.base.conf’. .
base . Patroni – , base , - , . . , Git, , .
Patroni? postgresql.conf postgresql.base.conf. , postgres . postgresql.conf, , etcd . postgresql.base.conf.
? alter system. , base.conf . alter system - , , , . , , Patronictl edit-config , maintenance_woke_mem shared_buffers. .

, . . . config. patroni.yaml. patroni.yaml , , config, , . alter system, . - alter system, , , max_connections, Patroni pending_restart.
alter system max_connections .
, . . Shares_buffers.
, . . . , . max_connections, max_locks_per_transaction, wal_level. Wal_revel wal . , . wal’ .
Patroni . , logical.
Patroni? Postgres . . Patroni. Patronictl edit-config . , , , , .

Patroni REST API, . , .

Patroni endpoints REST API. – , GET requests. , options , .
? 200 K
, , . PostgreSQL recovery .
200 OK
, , read-only , Postgres . . . Postgres , -, 503.
, . , endpoint /master
503.
Patroni. , . . . json-, xlog’, Postgres - . , . , Patroni 200.
endpoint /config
. , , Patronicrl. .
Patroni /switchover
/failover
. Switchover, , . . . , , - , - , , , - . , , .
Patroni REST API Postgres. /restart
endpoint.
Patroni . . . , pg_rewind . . , wal’ , , -. – /reinitialize
, . . Postgres, - base_backup.
endpoints Patronictl .

Patroni endpoint ? json-. database_system_identifier. , , . , , . batman. , Postgres .
. , .
server_version Postgres. – 10.0. , Postgres .

. , – , , timeline – 2.
xlog -, , xlog’ , .
timestamp – null. replayed_timestamp – null? , . , , , timestamp .
replayed_timestamp - , received 300 . ? ? , , . , received_timestamp , replayed_timestamp. , , , .

endpoints Postgres, Patroni.

endpoints , , - .
HAProxy . HAProxy , , – ? 200, 503. , . HAProxy , , . .
? , - IP -, IP. DNS, IP - .
Patroni - . shell script. Patroni . , Postgres, , on _start, Postgres , on_stop. on_reload, on_restart – .
On_role_change – . , , . . . Patroni pg_ctl promote. Patroni , on_role_change. , , IP , .
? , . IP . HAProxy – . HAProxy , . . confd. , etcd, ZooKeeper . https://github.com/zalando/patroni/blob/master/extras/confd/conf.d/haproxy.toml
, , etcd - . . . , confd . , reload, . . HAProxy.
, template HAProxy. max_connections, - . , .
? «on-marked-down shutdown-sessions». ? , 200, 503 , HAProxy . , , . , Postgres - . . HAProxy . , HAProxy health checks .
? confd, config PgBouncer. , PgBouncer . , , failover , . PgBouncer .
Postgres 10- connection string. read-write libpq . , , . read only -.

callbacks. , -.

callbacks , service_ip ( ip), .
promotion , service_ip. . . , , .
, -, callback , -, , . . . , on_role_change. scope – .

callbacks? . , -. callback , , , callback, . , , -, , IP - , . issue, .

? , - - , ?
tags. Patroni . . etcd, . .
, , nofailover true. false.
noloadbalance. read only, noloadbalance HAProxy , , 503, , true.
. clonefrom. , basebackup. , pg_basebackup , . - , , , . , , , . - clonefrom, Patroni basebackup . , - .
. , - -. . , , . nosync.
Patroni . , - . ? -. - . - , , . . . – . , .
Replicatefrom , . ? Patroni replication-. replication- - , , . . . , , - , , , .
replication-? , wal-, , Postgres - .
, Patroni etcd.

. postges2.yml . , postgres1. , postgres1 replication- postgres2 .

switchover failover? failover ?
Switchover – . . . .
Failover – , .

failover . , ? , . etcd xlog’. . , -, . 10 MB, , . , lag , 10 MB , . , , . manual failover. - , , . . , .
Switchover , . . Patroni. , switchover , . , , Patroni , – - . .. Postgres, Patroni , – . , switchover . , .

switchover.
. . switchover. . , .
. , . , , .
switchover. , : patronictl switchover batman. batman. , Patronictl , etcd.
postgres1. – enter, . . . . . , . , , . . Postgres.
Switchover . , switchover, .
. . . . , , . , , , Postgres. - 4 – switchover, , Patroni. AWS. , , , .
, 150 – . Patroni .
«», , . Patronictl . – ? postgresql0 postresql1. : «?». , . , .

patronictl list batman
. . . . «switchover», «Successfully failed over to "postgresql0"», . . postgresql0. , postgresql0 – . . . . , real only. .
, stopped running. .
Patroni. ? . lock’. . , , .
, . promote . . , , - , , switchover . . . , . switchover, switchover, . switchover , .
, , , . , , . . manual failover: demoting myself.
. Patroni API Patronictl . switchover High Availability, . . Patroni , demoting, , . . . . switchover, , , . 4 Patroni , , - , , .
, demoting. , . – pg_rewind. pg_rewind clean shutdown.

? . . , switchover. . , switchover, Patroni . , , Patroni switchover. Patronictl , switchover, - . . , , switchover.

Postgres. ? pg_ctl –d data directory restart
.
. – , promote. , , , Postgres.
Postgres – , , Postgres.
. . , , «restart». restart’ . . restart’ , , .
scheduled restart. , Postgres , , , , . , scheduled failover. , , restart - . Patroni restart. patronictl list, , .

, Patroni . , Patronictl failover, . . restart , , . , restart . restart , , restart, . , restart , , Patroni, , . lock , restart.
- Postgres pg_ctrl
, Patroni . .

GitLab , GitLab ?
, . , , .
, . . Pg_basebackup - - . - . - . , game over. , , - – , , .
Patroni «reinit», , . . . «reinit», , . Patroni , . , . . , Postgres, Postgres , , , . running.
, «patronictl reinit cluster» ? Reinit . Reinit , Postgres , switchover - , . .

. ? Patroni, postgres-. failover. , - .
. , Patroni failover, - postgres-, , - . , – , Patroni . , .
. Patronictl . . . . , . , , etcd . loop_wait.
failover. , , . . - promote.
– etcd, etcd -. , .
– , - etcd.
. . etcd. read-only , , etcd . , , .
, Patroni, Patroni Postgres, , Patroni promote multi-. Patroni .
, Patroni, postgres- .
Postgres Patroni , Patroni . . , - Postgres, , . Postgres, - , . Postgres . Patroni .
, , etcd, etcd, , .
, . . . , , basebackup .
failover. . . , , , Patroni , . . . switchover , , .

. «pause». b, , . , , . - . wait , . , «list» , « », , .
Patroni , , , .
. , Patroni , .
promote , . . . . , «pg_ctl posgresql1 promote».
? Patroni . . . , multi-, . split-brain. split-brain . Patroni . promote.
? Patroni , , lock’ . . . etcd , , etcd , . , , lock’.

lock’, REST API , , 503. lock’ 200. 503? , , REST API . REST API , 503. , , , , 503. , , .

, split-brain , lock’, ? immediate shutdown, . . Patroni , , . immediate shutdown. Postgres . , Patroni pg_rewind , , , .
pg_rewind. standby, secondary. . . . Patroni split-brain, .

. . Patroni . true false.
. ? Patroni , , . «synchronous standby name». Postgres. synchronous standby name, . . .
Patroni failover , . , , , , Patroni failover - , .
? , . - , , - . Patroni? Patroni . . .
, , - nosync, , , Patroni .
. . , . . . , , , .
, , , , . Patroni . synchronous_mode_strict, . . .
, . , , , .
. , Postgres , . – . . . , . , .
«synchronous commit», , . . setting synchronous_commit to local
, . . . , . , , . .
, ? , . GitHub, . , . , , Quorum , 10-.

, . . . . . – . synchronous_mode: true
. false . – .

, . , lock. . , . , , , . Patroni , «synchronous_standby_names». Postgres, , postgresql1. Postgres , postgresql1 standby.
. patronictl list. , . synchronous standby. , .

endpoint, 200 , . . , endpoint 200. ? , . . . . select . , select , .
endpoint, - , , . endpoint , , .
async endpoint, 200 , . async . , , 503, .
. synchronous_mode: false
. . , . list, , . async endpoint, 200. sync endpoint, 503. . . , .
, Patroni.
: « , standby?». , , . : synchronous_mode, synchronous_mode_strict. Strict , . , , . , . . , . , , , Patroni .

Patroni . , , - , . ?

, , basebackup, https://github.com/wal-e/wal-e ( wal-g). , , - , wal-e.
, . , Patroni - , Patroni , - . create_replica_method. .
, Patroni , . wal_e. wal_e . , , . , yml, .

? . , , no_master
. , , .
? - , . . . Patroni. Patroni , .

, . wal- basebackup, pg_dump.
. – . . . . . wale_restore. , Patroni . wale_restrore. , , . - , . connstring, . ? , , , WAL . , basebackup. . ., , .
no_master
. Envdir — , wal_e. , retries. .

, , 0, , . , Patroni . , . .

, , Patroni initdb.

, - . production - . .

custom bootstrap. , custom replica, create method, . . - . . . command. – s3.
point in time recovery. . . , - . - . , . , , s3 - , recovery target timeline.
, s3, Patroni recovery.conf . , , , timeline promote , recovery target timeline, promote , . . target timeline, . . - .

, , Patroni Postgres. Postgres wal’ - , s3 . - promote. Patroni post_bootstrap script. ? - , - . , , .
initdb . . . - initdb. , trust , localhost.
, instance Patroni . . . bootstrap . , . - bootstrap , Patroni initialize . , .

, post_bootstrap . , pg_stat_statements extension temlate1. ? - pg_stat_statements. . extension , superuser, superuser’. .

Patroni. . -, , , . . , scope
. batman.
Namespace
– , etcd . – , . Patroni, -. , namespace .
- REST API
Patroni . Patroni etcd, bootstrap, Postgres, watchdog
tags
.

restapi , API . SSL authentication.

DCS , etcd, Consul, . , , . , , , - . .

ZooKeeper , , . ZooKeeper . Exhibitor , , , .

Bootstrap . , , Bootstrap , .

bootstrap_method .

. listen_address connect_address. Listen_address – Postgres . Connect_address – , etcd , . .
– authentication. , Patroni superuser . , .
- Postgres .

callback replica_method .

, . , . safety_margin
. : «, 5 , , ». . . , -.
tags .

yml-. environment. .
environment variables. Patroni configuration. , environment variables . , - config , .

troubleshooting – , .
, . , .

. . etcd, etcd - , , etcd, . , , etcd . .

. Debian. postgres, pg_ctl path. Patroni. Patroni . subprocess. call
, . . . , pg_ctl
. , , , Postgres.
. , bindir
. , . path , Postgres.

, Patroni . , , . ( 10 ) , , . .

initdb Patronictl.yml. . , «data-checksums», checksums, , . initdb , --data-checksums
. --data-checksums: true
, - data-checksums
. Patroni, , . - data-checksums: true
, , , data-checksums . initdb , Patroni , .

. Yaml – , . . . yaml, yaml. yaml , . . yaml , Python, . , yaml , .
, ? , . , . .
, - , yaml , production.

. Debian Ubuntu Postgres, initdb . , -, .
, , initdb, ? , initdb, . postgres- , , , initdb .
Patroni , Patroni « ». , , , . . . , , . , , reinit .
. Debian, -, - .

.
Patroni. GitHub. open source . issue. issue. , .
Patroni. : https://patroni.readthedocs.io. . - , . . , Patroni . . , Kubernetes, , .
docker-, Postgres Patroni . Spilo. GitHub open source, Zalando , Postgres. .
:
( , )
: patroni kubernetes?
: Kubernetes Patroni Spilo. postgres-. open source .
: OpenShift?
: . , , Red Hat . OpenShift, OpenShift , , Red Hat. , .
: , standby. Patroni standby, ?
: , . , Patroni , . , standby. . production, -, , laptop’, .
, , . . - , standby. Patroni , . , ZooKeeper . Patroni . , Patroni , . Patroni. .
: bootstrap S3, ?
: wal-e, - . . . . , .
, S3 Amazon, , – , . S3, Amazon, .
: Postgres pg_ctl, - ?
: Patroni Postgres . , Patroni Postgres. , Patroni Postgres’, . . Patroni .
: « Postgres Patroni?».
: , . ?
: Patroni Postgres ?
: , Patroni . Patroni Postgres. , . , , . , , postmaster, Postgres. , Postgres, Patroni . . – Patroni.
: , ?
: - , Patroni - , , .
: , ?
: Patroni , , . , . . . , , .
: Patroni ?
: , . Patroni - . . , . . Patroni , . , . . . docker-, spilo, spilo Postgres Patroni. Patroni – , .
: Haproxy?
: – . . . , , HAProxy , , . HAProxy, HAProxy . Postgres. O , TCP proxy. postgres-, Postgres.