RE: Follow-up fixes for online wal_level change - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Follow-up fixes for online wal_level change
Date
Msg-id OS9PR01MB12149CD84B6CB6434E189FB8AF5C72@OS9PR01MB12149.jpnprd01.prod.outlook.com
Whole thread
In response to Re: Follow-up fixes for online wal_level change  (Guoqing Yang <yanggq1988@126.com>)
Responses Re: Follow-up fixes for online wal_level change
List pgsql-hackers
Dear Sawada-san,

> > I think that replaying the status change record itself is correct, as
> > it reflects the status at the time the record was written. The problem
> > is that the end-of-recovery code assumed that this cannot happen,
> > instead of adjusting the status. Therefore, the fix removes the
> > wal_level='minimal' special case from
> > UpdateLogicalDecodingStatusEndOfRecovery() so that it recomputes the
> > status as usual.

Good catch. I could reproduce.

I initially thought that we could just skip redoing for
XLOG_LOGICAL_DECODING_STATUS_CHANGE records. I confirmed it could also solve the
issue. Also, I think it could slightly reduce the redoing time because it does
not have to emit/wait the ProcSignalBarrier. But your point is also valid:
either way is fine for me.

I reviewed your patches and I could not find issues.

Best regards,
Hayato Kuroda
FUJITSU LIMITED


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: clean up size_t/ssize_t use with POSIX file system APIs
Next
From: "Greg Burd"
Date:
Subject: Re: Tepid: selective index updates for heap relations