From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | dilipbalaut(at)gmail(dot)com |
Cc: | robertmhaas(at)gmail(dot)com, hlinnaka(at)iki(dot)fi, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Race condition in recovery? |
Date: | 2021-05-18 06:58:08 |
Message-ID: | 20210518.155808.2163673343516543747.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Tue, 18 May 2021 15:52:07 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> FWIW, you could be get a problematic base backup by the following steps.
>
> 0. (make sure /tmp/hoge is removed)
> 1. apply the attached patch
> 2. create a primary then start
> 3. create a standby then start
> 4. place standby.signal to the primary, then restart it.
> 5. place the file /tmp/hoge.
> 6. promote the "primary".
> 7. You will see a log line like this
> LOG: WAIT START: CHECKPOINT_ONLINE: TLI=2
> 8. Take a base backup (without copying WAL files)
I carelessly have left the "modification" uncommented in the diff file.
@@ -6577,6 +6584,8 @@ StartupXLOG(void)
else
recoveryTargetTLI = ControlFile->checkPointCopy.ThisTimeLineID;
+ expectedTLEs = readTimeLineHistory(recoveryTargetTLI);
+ elog(LOG, "set expectedtles %d, %d", recoveryTargetTLI, list_length(expectedTLEs));
Disabling the lines would show the result of the ancient fix.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2021-05-18 07:09:37 | Re: Testing autovacuum wraparound (including failsafe) |
Previous Message | Kyotaro Horiguchi | 2021-05-18 06:52:07 | Re: Race condition in recovery? |