From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | andres(at)anarazel(dot)de |
Cc: | hlinnaka(at)iki(dot)fi, tejeswarm(at)hotmail(dot)com, masahiko(dot)sawada(at)2ndquadrant(dot)com, pgsql-hackers(at)postgresql(dot)org, hexexpert(at)comcast(dot)net |
Subject: | Re: Corruption during WAL replay |
Date: | 2021-01-06 08:33:27 |
Message-ID: | 20210106.173327.1444585955309078930.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Mon, 17 Aug 2020 11:22:15 -0700, Andres Freund <andres(at)anarazel(dot)de> wrote in
> Hi,
>
> On 2020-08-17 14:05:37 +0300, Heikki Linnakangas wrote:
> > On 14/04/2020 22:04, Teja Mupparti wrote:
> > > Thanks Kyotaro and Masahiko for the feedback. I think there is a
> > > consensus on the critical-section around truncate,
> >
> > +1
>
> I'm inclined to think that we should do that independent of the far more
> complicated fix for other related issues.
...
> > Perhaps a better approach would be to prevent the checkpoint from
> > completing, until all in-progress truncations have completed. We have a
> > mechanism to wait out in-progress commits at the beginning of a checkpoint,
> > right after the redo point has been established. See comments around the
> > GetVirtualXIDsDelayingChkpt() function call in CreateCheckPoint(). We could
> > have a similar mechanism to wait out the truncations before *completing* a
> > checkpoint.
>
> What I outlined earlier *is* essentially a way to do so, by preventing
> checkpointing from finishing the buffer scan while a dangerous state
> exists.
Seems reasonable. The attached does that. It actually works for the
initial case.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
delay_chkpt_cmpl_after_trunc_sucess.patch | text/x-patch | 13.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Antonin Houska | 2021-01-06 08:42:10 | Re: Parallel INSERT (INTO ... SELECT ...) |
Previous Message | Amit Kapila | 2021-01-06 08:32:52 | Re: When (and whether) should we improve the chapter on parallel query to accommodate parallel data updates? |