On 2024/07/11 1:35, Robert Haas wrote:
On Wed, Jul 10, 2024 at 10:10 AM Robert Haas <robertmh...@gmail.com> wrote:
On Wed, Jul 10, 2024 at 1:56 AM Fujii Masao <masao.fu...@oss.nttdata.com> wrote:
I believe this issue occurs when the server is shut down cleanly.
The shutdown-checkpoint record retains the wal_level value used
before the shutdown. If wal_level is changed after this,
the wal_level that indicated by the shutdown-checkpoint record
and that the WAL data generated afterwards depends on may not match.

Oh, that's a problem. I'll have to think about that.

Here is an attempt at fixing this problem.

Thanks for updating the patch!

+        * fast_forward is normally false, but is true when we have encountered
+        * WAL generated with wal_level=minimal and are skipping over it without
+        * emitting summary files. In this case, summarized_tli and 
summarized_lsn
+        * will advance even though nothing is being written to disk, until we
+        * again reach a point where wal_level>minimal.
+        *
         * summarizer_pgprocno is the proc number of the summarizer process, if
         * one is running, or else INVALID_PROC_NUMBER.
         *
@@ -83,6 +89,7 @@ typedef struct
        TimeLineID      summarized_tli;
        XLogRecPtr      summarized_lsn;
        bool            lsn_is_exact;
+       bool            fast_forward;

It looks like the fast_forward field in WalSummarizerData is no longer 
necessary.

So far, I haven't found any other issues with the patch.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION


Reply via email to