Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal - Mailing list pgsql-hackers

From Fujii Masao
Subject Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal
Date
Msg-id 6e30082e-041b-4e31-9633-95a66de76f5d@oss.nttdata.com
Whole thread Raw
Responses Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal
Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal
List 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
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
Attachment

pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: Optimize numeric multiplication for one and two base-NBASE digit multiplicands.
Next
From: Marat Buharov
Date:
Subject: Re: [PATCH] Add min/max aggregate functions to BYTEA