From deaea545384c9913d9f8a9673c9cdae63b6c8ec9 Mon Sep 17 00:00:00 2001 From: Alicia Cozine Date: Fri, 16 Sep 2022 11:38:06 -0500 Subject: [PATCH 1/2] adds keepalive values to postgresql config --- roles/postgresql/templates/postgresql.conf.j2 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/postgresql/templates/postgresql.conf.j2 b/roles/postgresql/templates/postgresql.conf.j2 index 7c4cc33c4e..135512cfe3 100644 --- a/roles/postgresql/templates/postgresql.conf.j2 +++ b/roles/postgresql/templates/postgresql.conf.j2 @@ -1,5 +1,7 @@ -# This file is {{ ansible_managed }} and will be replaced. Make changes on the -# playbook +# This file is {{ ansible_managed }} and will be replaced. +# Make any necessary changes in princeton_ansible. +# Do not edit this file manually. +# # ----------------------------- # PostgreSQL configuration file # ----------------------------- @@ -98,13 +100,11 @@ ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' # (change requires rest # - TCP Keepalives - # see "man 7 tcp" for details -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default - +# Time of inactivity before first keepalive request is sent, in seconds +tcp_keepalives_idle = 60 +# Time between one keepalive request and the next, in seconds tcp_keepalives_interval = 30 +# Number of keepalive requests sent before connection is considered broken +tcp_keepalives_count = 10 #------------------------------------------------------------------------------ # RESOURCE USAGE (except WAL) From ee8d9abc49ccfa5c438c551914fd732f7751b054 Mon Sep 17 00:00:00 2001 From: Alicia Cozine Date: Fri, 16 Sep 2022 12:54:02 -0500 Subject: [PATCH 2/2] fixed linebreak mistake --- roles/postgresql/templates/postgresql.conf.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/postgresql/templates/postgresql.conf.j2 b/roles/postgresql/templates/postgresql.conf.j2 index 135512cfe3..a7946d8b90 100644 --- a/roles/postgresql/templates/postgresql.conf.j2 +++ b/roles/postgresql/templates/postgresql.conf.j2 @@ -102,7 +102,8 @@ ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' # (change requires rest # Time of inactivity before first keepalive request is sent, in seconds tcp_keepalives_idle = 60 -# Time between one keepalive request and the next, in seconds tcp_keepalives_interval = 30 +# Time between one keepalive request and the next, in seconds +tcp_keepalives_interval = 30 # Number of keepalive requests sent before connection is considered broken tcp_keepalives_count = 10