summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas2023-11-14 18:49:28 +0000
committerRobert Haas2023-11-30 14:10:48 +0000
commitcee201dcc7aa51e47ce734af95264a48b9f79d88 (patch)
tree957e297f41daf1776ad110555b48e32bfd6598e4
parentf88da16681f8defc813f844442f004e425a762cf (diff)
Test patch: Enable summarize_wal by default.walsummarizer2
To avoid test failures, must remove the prohibition against running summarize_wal=off with wal_level=minimal, because a bunch of tests run with wal_level=minimal. Not for commit.
-rw-r--r--src/backend/postmaster/postmaster.c3
-rw-r--r--src/backend/postmaster/walsummarizer.c2
-rw-r--r--src/backend/utils/misc/guc_tables.c2
-rw-r--r--src/test/recovery/t/001_stream_rep.pl2
-rw-r--r--src/test/recovery/t/019_replslot_limit.pl3
-rw-r--r--src/test/recovery/t/020_archive_status.pl1
-rw-r--r--src/test/recovery/t/035_standby_logical_decoding.pl1
7 files changed, 9 insertions, 5 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 1d52a2db7c..37c711230b 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -935,9 +935,6 @@ PostmasterMain(int argc, char *argv[])
if (max_wal_senders > 0 && wal_level == WAL_LEVEL_MINIMAL)
ereport(ERROR,
(errmsg("WAL streaming (max_wal_senders > 0) requires wal_level \"replica\" or \"logical\"")));
- if (summarize_wal && wal_level == WAL_LEVEL_MINIMAL)
- ereport(ERROR,
- (errmsg("WAL cannot be summarized when wal_level is \"minimal\"")));
/*
* Other one-time internal sanity checks can go here, if they are fast.
diff --git a/src/backend/postmaster/walsummarizer.c b/src/backend/postmaster/walsummarizer.c
index 7966755f22..74a0116a13 100644
--- a/src/backend/postmaster/walsummarizer.c
+++ b/src/backend/postmaster/walsummarizer.c
@@ -139,7 +139,7 @@ static XLogRecPtr redo_pointer_at_last_summary_removal = InvalidXLogRecPtr;
/*
* GUC parameters
*/
-bool summarize_wal = false;
+bool summarize_wal = true;
int wal_summary_keep_time = 10 * 24 * 60;
static XLogRecPtr GetLatestLSN(TimeLineID *tli);
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index 405c422db7..d18f93d3c8 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -1796,7 +1796,7 @@ struct config_bool ConfigureNamesBool[] =
NULL
},
&summarize_wal,
- false,
+ true,
NULL, NULL, NULL
},
diff --git a/src/test/recovery/t/001_stream_rep.pl b/src/test/recovery/t/001_stream_rep.pl
index 95f9b0d772..0d0e63b8dc 100644
--- a/src/test/recovery/t/001_stream_rep.pl
+++ b/src/test/recovery/t/001_stream_rep.pl
@@ -15,6 +15,8 @@ my $node_primary = PostgreSQL::Test::Cluster->new('primary');
$node_primary->init(
allows_streaming => 1,
auth_extra => [ '--create-role', 'repl_role' ]);
+# WAL summarization can postpone WAL recycling, leading to test failures
+$node_primary->append_conf('postgresql.conf', "summarize_wal = off");
$node_primary->start;
my $backup_name = 'my_backup';
diff --git a/src/test/recovery/t/019_replslot_limit.pl b/src/test/recovery/t/019_replslot_limit.pl
index 7d94f15778..a8b342bb98 100644
--- a/src/test/recovery/t/019_replslot_limit.pl
+++ b/src/test/recovery/t/019_replslot_limit.pl
@@ -22,6 +22,7 @@ $node_primary->append_conf(
min_wal_size = 2MB
max_wal_size = 4MB
log_checkpoints = yes
+summarize_wal = off
));
$node_primary->start;
$node_primary->safe_psql('postgres',
@@ -256,6 +257,7 @@ $node_primary2->append_conf(
min_wal_size = 32MB
max_wal_size = 32MB
log_checkpoints = yes
+summarize_wal = off
));
$node_primary2->start;
$node_primary2->safe_psql('postgres',
@@ -310,6 +312,7 @@ $node_primary3->append_conf(
max_wal_size = 2MB
log_checkpoints = yes
max_slot_wal_keep_size = 1MB
+ summarize_wal = off
));
$node_primary3->start;
$node_primary3->safe_psql('postgres',
diff --git a/src/test/recovery/t/020_archive_status.pl b/src/test/recovery/t/020_archive_status.pl
index fa24153d4b..d0d6221368 100644
--- a/src/test/recovery/t/020_archive_status.pl
+++ b/src/test/recovery/t/020_archive_status.pl
@@ -15,6 +15,7 @@ $primary->init(
has_archiving => 1,
allows_streaming => 1);
$primary->append_conf('postgresql.conf', 'autovacuum = off');
+$primary->append_conf('postgresql.conf', 'summarize_wal = off');
$primary->start;
my $primary_data = $primary->data_dir;
diff --git a/src/test/recovery/t/035_standby_logical_decoding.pl b/src/test/recovery/t/035_standby_logical_decoding.pl
index 9c34c0d36c..482edc57a8 100644
--- a/src/test/recovery/t/035_standby_logical_decoding.pl
+++ b/src/test/recovery/t/035_standby_logical_decoding.pl
@@ -250,6 +250,7 @@ $node_primary->append_conf(
wal_level = 'logical'
max_replication_slots = 4
max_wal_senders = 4
+summarize_wal = off
});
$node_primary->dump_info;
$node_primary->start;