Re: [Patch] ALTER SYSTEM READ ONLY
Amul Sul <sulamul@gmail.com>
Attachments
- v36-0004-Remove-dependencies-on-startup-process-specifica.patch (application/x-patch) patch v36-0004
- v36-0003-Create-XLogAcceptWrites-function-with-code-from-.patch (application/x-patch) patch v36-0003
- v36-0001-Refactor-some-end-of-recovery-code-out-of-Startu.patch (application/x-patch) patch v36-0001
- v36-0002-Postpone-some-end-of-recovery-operations-relatin.patch (application/x-patch) patch v36-0002
On Fri, Sep 24, 2021 at 5:07 PM Amul Sul <sulamul@gmail.com> wrote: > > On Thu, Sep 23, 2021 at 11:56 PM Robert Haas <robertmhaas@gmail.com> wrote: > > > > On Mon, Sep 20, 2021 at 11:20 AM Amul Sul <sulamul@gmail.com> wrote: > > > Ok, understood, I have separated my changes into 0001 and 0002 patch, > > > and the refactoring patches start from 0003. > > > > I think it would be better in the other order, with the refactoring > > patches at the beginning of the series. > > > > Ok, will do that. I did this other way to minimize the diff e.g. > deletion diff of RecoveryXlogAction enum and > DetermineRecoveryXlogAction(), etc. > I have reversed the patch order. Now refactoring patches will be first, and the patch that removes the dependencies on global & local variables will be the last. I did the necessary modification in the refactoring patches too e.g. removed DetermineRecoveryXlogAction() and RecoveryXlogAction enum which is no longer needed (thanks to commit # 1d919de5eb3fffa7cc9479ed6d2915fb89794459 to make code simple). To find the value of InRecovery after we clear it, patch still uses ControlFile's DBState, but now the check condition changed to a more specific one which is less confusing. In casual off-list discussion, the point was made to check SharedRecoveryState to find out the InRecovery value afterward, and check that using RecoveryInProgress(). But we can't depend on SharedRecoveryState because at the start it gets initialized to RECOVERY_STATE_CRASH irrespective of InRecovery that happens later. Therefore, we can't use RecoveryInProgress() which always returns true if SharedRecoveryState != RECOVERY_STATE_DONE. I am posting only refactoring patches for now. Regards, Amul
Commits
-
Initialize variable to placate compiler.
- a030a0c5ccb1 15.0 landed
-
StartupXLOG: Don't repeatedly disable/enable local xlog insertion.
- 18e0913a4203 15.0 landed
-
StartupXLOG: Call CleanupAfterArchiveRecovery after XLogReportParameters.
- a75dbf7f9ee6 15.0 landed
-
Postpone some end-of-recovery operations related to allowing WAL.
- 811051c2e7af 15.0 landed
-
Refactor some end-of-recovery code out of StartupXLOG().
- 6df1543abfed 15.0 landed
-
Re-enable contrib/bloom's TAP tests.
- 7d1aa6bf1c27 15.0 cited
-
Remove unnecessary call to ReadCheckpointRecord().
- 1d919de5eb3f 15.0 cited
-
Allow for error or refusal while absorbing a ProcSignalBarrier.
- a3ed4d1efe9f 14.0 landed
-
Add comment to explain an unused function parameter
- 101f903e51f5 14.0 cited
-
Extend the ProcSignal mechanism to support barriers.
- 16a4e4aecd47 13.0 cited
-
At promotion, don't leave behind a partial segment on the old timeline.
- 7cbee7c0a1db 9.5.0 cited