Re: [Patch] ALTER SYSTEM READ ONLY
Amul Sul <sulamul@gmail.com>
Attachments
- v41-0007-Test-Few-tap-tests-for-wal-prohibited-system.patch (application/octet-stream) patch v41-0007
- v41-0006-Documentation.patch (application/octet-stream) patch v41-0006
- v41-0004-Implement-wal-prohibit-state-using-global-barrie.patch (application/octet-stream) patch v41-0004
- v41-0003-Allow-RequestCheckpoint-call-from-checkpointer-p.patch (application/octet-stream) patch v41-0003
- v41-0005-Error-or-Assert-before-START_CRIT_SECTION-for-WA.patch (application/octet-stream) patch v41-0005
- v41-0002-Remove-dependencies-on-startup-process-specifica.patch (application/octet-stream) patch v41-0002
- v41-0001-Create-XLogAcceptWrites-function-with-code-from-.patch (application/octet-stream) patch v41-0001
On Tue, Oct 26, 2021 at 4:29 PM Amul Sul <sulamul@gmail.com> wrote: > > On Mon, Oct 25, 2021 at 8:15 PM Robert Haas <robertmhaas@gmail.com> wrote: > > > > On Mon, Oct 25, 2021 at 3:05 AM Amul Sul <sulamul@gmail.com> wrote: > > > Ok, did the same in the attached 0001 patch. > > > > > > There is no harm in calling LocalSetXLogInsertAllowed() calling > > > multiple times, but the problem I can see is that with this patch user > > > is allowed to call LocalSetXLogInsertAllowed() at the time it is > > > supposed not to be called e.g. when LocalXLogInsertAllowed = 0; > > > WAL writes are explicitly disabled. > > > > I've pushed 0001 and 0002 but I reversed the order of them and made a > > few other edits. > > > > Thank you! > > I have rebased the remaining patches on top of the latest master head > (commit # e63ce9e8d6a). > > In addition to that, I did the additional changes to 0002 where I > haven't included the change that tries to remove arguments of > CleanupAfterArchiveRecovery() in the previous version. Because if we > want to use XLogCtl->replayEndTLI and XLogCtl->replayEndRecPtr to > replace EndOfLogTLI and EndOfLog arguments respectively, then we also > need to consider the case where EndOfLog is changing if the > abort-record does exist. That can be decided only in XLogAcceptWrite() > before the shared memory value related to abort-record is going to be > clear. > Attached is the rebased version of refactoring as well as the pg_prohibit_wal feature patches for the latest master head (commit # 39a3105678a). I was planning to attach the rebased version of isolation test patches that Mark has posted before[1], but some permutation tests are not stable, where expected errors get printed differently; therefore, I dropped that from the attachment, for now. Regards, Amul 1] https://postgr.es/m/9BA3BA57-6B7B-45CB-B8D9-6B5EB0104FFA@enterprisedb.com
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