Re: [Patch] ALTER SYSTEM READ ONLY

Amul Sul <sulamul@gmail.com>

From: Amul Sul <sulamul@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-11-23T06:36:45Z
Lists: pgsql-hackers

Attachments

On Fri, Nov 20, 2020 at 11:13 PM Amul Sul <sulamul@gmail.com> wrote:
>
> On Fri, 20 Nov 2020 at 9:53 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>>
>> On Thu, Oct 8, 2020 at 6:23 AM Amul Sul <sulamul@gmail.com> wrote:
>> > On a quick look at the latest 0001 patch, the following hunk to reset leftover
>> > flags seems to be unnecessary:
>> >
>> > + /*
>> > + * If some barrier types were not successfully absorbed, we will have
>> > + * to try again later.
>> > + */
>> > + if (!success)
>> > + {
>> > + ResetProcSignalBarrierBits(flags);
>> > + return;
>> > + }
>> >
>> > When the ProcessBarrierPlaceholder() function returns false without an error,
>> > that barrier flag gets reset within the while loop.  The case when it has an
>> > error, the rest of the flags get reset in the catch block.  Correct me if I am
>> > missing something here.
>>
>> Good catch. I think you're right. Do you want to update accordingly?
>
>
> Sure, Ill update that. Thanks for the confirmation.
>

Attached is the updated version where unnecessary ResetProcSignalBarrierBits()
call in 0001 patch is removed. The rest of the patches are unchanged, thanks.

>>
>> Andres, do you like the new loop better?
>>

Regards,
Amul

Commits

  1. Initialize variable to placate compiler.

  2. StartupXLOG: Don't repeatedly disable/enable local xlog insertion.

  3. StartupXLOG: Call CleanupAfterArchiveRecovery after XLogReportParameters.

  4. Postpone some end-of-recovery operations related to allowing WAL.

  5. Refactor some end-of-recovery code out of StartupXLOG().

  6. Re-enable contrib/bloom's TAP tests.

  7. Remove unnecessary call to ReadCheckpointRecord().

  8. Allow for error or refusal while absorbing a ProcSignalBarrier.

  9. Add comment to explain an unused function parameter

  10. Extend the ProcSignal mechanism to support barriers.

  11. At promotion, don't leave behind a partial segment on the old timeline.