From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | michael(at)paquier(dot)xyz |
Cc: | jgdr(at)dalibo(dot)com, masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: [BUG] non archived WAL removed during production crash recovery |
Date: | 2020-04-21 06:08:17 |
Message-ID: | 20200421.150817.1089565975398030716.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | PostgreSQL : PostgreSQL 메일 링리스트 : 2020-04-21 이후 PGSQL 토토 커뮤니티 06:08 Postg젠 토토SQL : |
At Tue, 21 Apr 2020 13:57:39 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> On Tue, Apr 21, 2020 at 12:09:25PM +0900, Kyotaro Horiguchi wrote:
> > + if (!XLogArchivingAlways() &&
> > + GetRecoveryState() == RECOVERY_STATE_ARCHIVE)
> >
> > Is rewritten as
> >
> > + if (!XLogArchivingAlways() &&
> > + GetDBState() > DB_IN_CRASH_RECOVERY)
> >
> > FWIW, what annoyed me is there are three variables that are quite
> > similar but has different domains, ControlFile->state,
> > XLogCtl->SharedRecoveryState, and LocalRecoveryInProgress. I didn't
> > mind there were two, but three seems a bit too many to me.
>
> That's actually the pattern I would avoid for clarity. There is no
> need to add more dependencies to the entries of DBState for the sake
> of this patch, and this smells like a trap if more values are added to
> it in an order that does not match what we have been assuming in the
> context of this thread.
Yes. Anywaay that would be another issue, if it is an issue.
I'm fine with the current state.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Hamid Akhtar | 2020-04-21 07:34:03 | Re: BUG #16382: pgdg-redhat-repo-42.0-9 has two sections with the same name - causing issues |
Previous Message | Hamid Akhtar | 2020-04-21 05:00:05 | Re: Bug with memory leak on cert validation in libpq |
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2020-04-21 06:08:30 | forgotten initalization of a variable |
Previous Message | Michael Paquier | 2020-04-21 05:54:28 | Re: Remove non-fast promotion Re: Should we remove a fallback promotion? take 2 |