postgresql_patroni

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
postgresql_patroni [2024/02/21 08:52] – [Setup Patroni] andonovjpostgresql_patroni [2024/02/21 08:54] (current) – old revision restored (2024/02/20 20:02) andonovj
Line 157: Line 157:
  
 cat > /etc/patroni/stampede.yml <<EOF cat > /etc/patroni/stampede.yml <<EOF
-scope: stampede +scope: stampede  
-name: node02 +name: ${host}  
- +  
-restapi: +restapi:  
-  listen: node02:8008 +  listen: ${host}:8008  
-  connect_address: node02:8008 +  connect_address: ${host}:8008  
- +  
-etcd: +etcd:  
-  host: node02:2379 +  host: ${host}:2379  
- +  
-bootstrap: +bootstrap:  
-  dcs: +  dcs:  
-    ttl: 30 +    ttl: 30  
-    loop_wait: 10 +    loop_wait: 10  
-    retry_timeout: 10 +    retry_timeout: 10  
-    maximum_lag_on_failover: 1048576 +    maximum_lag_on_failover: 1048576  
-    postgresql: +    postgresql:  
-      use_pg_rewind: true +      use_pg_rewind: true  
-      use_slots: true +      use_slots: true  
-      parameters: +      parameters:  
-        wal_level: logical +        wal_level: logical  
-        wal_log_hints: "on" +        wal_log_hints: "on"  
- +  
-  initdb: +  initdb:  
-  - encoding: UTF8 +  - encoding: UTF8  
-  - data-checksums +  - data-checksums  
- +  
-  pg_hba: +  pg_hba:  
-  - host replication rep_user 10.100.10.202/24 md5 +  - host replication rep_user ${ipaddr}/24 md5  
-  - host all all 10.100.10.0/24 md5 +  - host all all ${subnet}.0/24 md5  
- +  
-  users: +  users:  
-    admin: +    admin:  
-      password: adminpass +      password: adminpass  
-      options: +      options:  
-        - createrole +        - createrole  
-        - createdb +        - createdb  
- +  
-postgresql: +postgresql:  
-  listen: node02:5432 +  listen: ${host}:5432  
-  connect_address: node02:5432 +  connect_address: ${host}:5432  
-  data_dir: /db/pgdata +  data_dir: /db/pgdata  
-  bin_dir: /usr/pgsql-15/bin +  bin_dir: ${bindir} 
-  pgpass: /tmp/pgpass0 +  pgpass: /tmp/pgpass0  
-  authentication: +  authentication:  
-    replication: +    replication:  
-      username: rep_user +      username: rep_user  
-      password: newpass +      password: newpass  
-    superuser: +    superuser:  
-      username: postgres +      username: postgres  
-      password: newpass +      password: newpass  
-  parameters: +  parameters:  
-    unix_socket_directories: '/var/run/postgresql' +    unix_socket_directories: '/var/run/postgresql'  
-    external_pid_file: '/var/run/postgresql/15-main.pid' +    external_pid_file: '/var/run/postgresql/15-main.pid'  
-    logging_collector: "on" +    logging_collector: "on"  
-    log_directory: "/var/log/postgresql" +    log_directory: "/var/log/postgresql"  
-    log_filename: "postgresql-15-main.log"+    log_filename: "postgresql-15-main.log" 
     archive_command: 'test ! -f /db/wal_archive/%f && cp %p /db/wal_archive/%f'     archive_command: 'test ! -f /db/wal_archive/%f && cp %p /db/wal_archive/%f'
     archive_mode: 'on'     archive_mode: 'on'
  • postgresql_patroni.txt
  • Last modified: 2024/02/21 08:54
  • by andonovj