Re: [Patch] ALTER SYSTEM READ ONLY - Mailing list pgsql-hackers

From Dilip Kumar
Subject Re: [Patch] ALTER SYSTEM READ ONLY
Date
Msg-id CAFiTN-tjhxP4i+MhWE3uyMDRwpiT0aK_S_F1bXQOYv6GS49ssw@mail.gmail.com
Whole thread Raw
In response to Re: [Patch] ALTER SYSTEM READ ONLY  (Amul Sul <sulamul@gmail.com>)
Responses Re: [Patch] ALTER SYSTEM READ ONLY
List pgsql-hackers
On Tue, May 11, 2021 at 2:16 PM Amul Sul <sulamul@gmail.com> wrote:

> I get why you think that, I wasn't very precise in briefing the problem.
>
> Any new backend that gets connected right after the shared memory
> state changes to WALPROHIBIT_STATE_GOING_READ_WRITE will be by
> default allowed to do the WAL writes.  Such backends can perform write
> operation before the checkpointer does the XLogAcceptWrites().

Okay, make sense now. But my next question is why do we allow backends
to write WAL in WALPROHIBIT_STATE_GOING_READ_WRITE state? why don't we
wait until the shared memory state is changed to
WALPROHIBIT_STATE_READ_WRITE?

-- 
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: compute_query_id and pg_stat_statements
Next
From: Etsuro Fujita
Date:
Subject: Re: Inherited UPDATE/DELETE vs async execution