fix: Postgres | adjust postgres.conf params for smaller wal size + defaults
This commit is contained in:
@@ -330,6 +330,36 @@ export class PostgresCluster extends Construct {
|
||||
replicationTLSSecret: certNames.client,
|
||||
},
|
||||
postgresql: {
|
||||
parameters: {
|
||||
archive_mode: "on",
|
||||
archive_timeout: "5min",
|
||||
checkpoint_timeout: "10min",
|
||||
checkpoint_completion_target: "0.7",
|
||||
dynamic_shared_memory_type: "posix",
|
||||
full_page_writes: "on",
|
||||
log_destination: "csvlog",
|
||||
log_directory: "/controller/log",
|
||||
log_filename: "postgres",
|
||||
log_rotation_age: "0",
|
||||
log_rotation_size: "0",
|
||||
log_truncate_on_rotation: "false",
|
||||
logging_collector: "on",
|
||||
max_parallel_workers: "32",
|
||||
max_replication_slots: "32",
|
||||
max_wal_size: "768MB",
|
||||
max_worker_processes: "32",
|
||||
max_slot_wal_keep_size: "256MB",
|
||||
min_wal_size: "128MB",
|
||||
shared_memory_type: "mmap",
|
||||
shared_preload_libraries: "",
|
||||
ssl_max_protocol_version: "TLSv1.3",
|
||||
ssl_min_protocol_version: "TLSv1.3",
|
||||
wal_keep_size: "128MB",
|
||||
wal_level: "logical",
|
||||
wal_log_hints: "on",
|
||||
wal_receiver_timeout: "5s",
|
||||
wal_sender_timeout: "5s",
|
||||
},
|
||||
pg_hba: [
|
||||
`hostssl all ${options.primaryUser} all cert`,
|
||||
"hostssl sameuser all all cert",
|
||||
|
||||
Reference in New Issue
Block a user