Improve PostgreSQL streaming replication in production #516

Merged
greg merged 2 commits from feature/keep_wal_segments into master 2023-10-07 08:18:24 +00:00
Showing only changes of commit eb1303a8da - Show all commits

View File

@ -54,11 +54,11 @@ action :create do
unix_socket_directories: "/var/run/postgresql",
dynamic_shared_memory_type: "posix",
timezone: "UTC", # default is GMT
listen_addresses: "0.0.0.0"
listen_addresses: "0.0.0.0",
promote_trigger_file: "#{postgresql_data_dir}/failover.trigger",
wal_keep_segments: 256
}
additional_config[:promote_trigger_file] = "#{postgresql_data_dir}/failover.trigger"
postgresql_server_conf "main" do
version postgresql_version
additional_config additional_config