Hi,
The documentation states that "WAL summarization cannot be enabled when wal_level is set to minimal." Therefore, at
startup,the postmaster checks these settings and exits with an error if they are not configured properly.
However, I found that summarize_wal can still be enabled while the server is running with wal_level=minimal. Please see
thefollowing example to cause this situation. I think this is a bug.
=# SHOW wal_level;
wal_level
-----------
minimal
(1 row)
=# SELECT * FROM pg_get_wal_summarizer_state();
summarized_tli | summarized_lsn | pending_lsn | summarizer_pid
----------------+----------------+-------------+----------------
0 | 0/0 | 0/0 | (null)
(1 row)
=# ALTER SYSTEM SET summarize_wal TO on;
ALTER SYSTEM
=# SELECT pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)
=# SELECT * FROM pg_get_wal_summarizer_state();
summarized_tli | summarized_lsn | pending_lsn | summarizer_pid
----------------+----------------+-------------+----------------
1 | 0/1492D80 | 0/1492DF8 | 12228
(1 row)
The attached patch adds a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal, fixing
theissue.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION