From 7aca296a23deacdf8853f41d9216c4735b35dc72 Mon Sep 17 00:00:00 2001 From: Vincent Chau <99756290+vincentwschau@users.noreply.github.com> Date: Mon, 4 Mar 2024 10:52:19 -0500 Subject: [PATCH 1/2] Enable hot_standby_feedback. --- indexer/rds.tf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indexer/rds.tf b/indexer/rds.tf index ad20012e..bae92d37 100644 --- a/indexer/rds.tf +++ b/indexer/rds.tf @@ -169,6 +169,15 @@ resource "aws_db_parameter_group" "main" { value = "all" # Default is top. } + # Enables primary instance to get feedback from standby instances on what queries are + # running on them. This helps reduce the frequency of queries being canceled on standby + # instances due to the primary cleaning up records. + # More details: https://postgresqlco.nf/doc/en/param/hot_standby_feedback/ + parameter { + name = "hot_standby_feedback" + value = "1" # Default is false (disabled). + } + tags = { Name = "${var.environment}-${var.indexers[var.region].name}-db-parameter-group" Environment = var.environment From f8655c4bf6d88642c139de0fb0607a78ca1ac135 Mon Sep 17 00:00:00 2001 From: Vincent Chau <99756290+vincentwschau@users.noreply.github.com> Date: Mon, 4 Mar 2024 10:55:54 -0500 Subject: [PATCH 2/2] Fix lint. --- indexer/rds.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexer/rds.tf b/indexer/rds.tf index bae92d37..b6205c77 100644 --- a/indexer/rds.tf +++ b/indexer/rds.tf @@ -174,7 +174,7 @@ resource "aws_db_parameter_group" "main" { # instances due to the primary cleaning up records. # More details: https://postgresqlco.nf/doc/en/param/hot_standby_feedback/ parameter { - name = "hot_standby_feedback" + name = "hot_standby_feedback" value = "1" # Default is false (disabled). }