From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal |
Date: | 2024-07-03 14:08:48 |
Message-ID: | 6e30082e-041b-4e31-9633-95a66de76f5d@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 the following 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 the issue.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Prevent-summarize_wal-from-enabling-when-wal_leve.patch | text/plain | 2.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Marat Buharov | 2024-07-03 14:17:39 | Re: [PATCH] Add min/max aggregate functions to BYTEA |
Previous Message | Joel Jacobson | 2024-07-03 13:48:58 | Re: Optimize numeric multiplication for one and two base-NBASE digit multiplicands. |