Skip to content

Commit ad802fe

Browse files
[DPE-5512] postgresql.conf hardening (#621)
* postgresql.conf hardening Signed-off-by: Marcelo Henrique Neppel <[email protected]> * Fix connections logging parameters Signed-off-by: Marcelo Henrique Neppel <[email protected]> --------- Signed-off-by: Marcelo Henrique Neppel <[email protected]>
1 parent 0a73743 commit ad802fe

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ options:
2727
description: |
2828
Logs each successful connection.
2929
type: boolean
30-
default: false
30+
default: true
3131
logging_log_disconnections:
3232
description: |
3333
Logs end of a session, including duration.
3434
type: boolean
35-
default: false
35+
default: true
3636
logging_log_lock_waits:
3737
description: |
3838
Logs long lock waits.

templates/patroni.yml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,23 @@ bootstrap:
7373
{%- endif %}
7474
archive_mode: on
7575
autovacuum: true
76+
debug_print_plan: 'off'
77+
debug_print_parse: 'off'
78+
debug_print_rewritten: 'off'
7679
fsync: true
7780
full_page_writes: true
7881
lc_messages: 'en_US.UTF8'
7982
log_autovacuum_min_duration: 60000
8083
log_checkpoints: 'on'
8184
log_destination: 'stderr'
8285
log_directory: '{{ postgresql_log_path }}'
86+
log_error_verbosity: 'verbose'
8387
log_file_mode: '0600'
8488
log_filename: 'postgresql-%w_%H%M.log'
8589
log_hostname: 'off'
8690
log_line_prefix: '%t [%p]: user=%u,db=%d,app=%a,client=%h,line=%l '
8791
log_min_duration_sample: -1
92+
log_min_error_statement: 'warning'
8893
log_recovery_conflict_waits: 'on'
8994
log_replication_commands: 'on'
9095
log_rotation_age: 1

0 commit comments

Comments
 (0)