Re: Race condition in recovery?

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, hlinnaka <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Race condition in recovery?
Date: 2021-06-09 09:41:59
Message-ID: CAFiTN-vFqDr55Jj9bOHgyjVkEwqm+U1NH=4pxEiEhYnMHpTwKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 9, 2021 at 1:37 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
>
> On Wed, Jun 9, 2021 at 12:14 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >
> > On Wed, Jun 9, 2021 at 2:07 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > 2021-06-09 12:11:08.618 IST [122456] LOG: entering standby mode
> > 2021-06-09 12:11:08.622 IST [122456] LOG: restored log file "00000002.history" from archive
> > cp: cannot stat ‘/home/dilipkumar/work/PG/postgresql/src/test/recovery/tmp_check/t_025_stuck_on_old_timeline_primary_data/archives/000000010000000000000002’: No such file or directory
> > 2021-06-09 12:11:08.627 IST [122456] LOG: redo starts at 0/2000028
> > 2021-06-09 12:11:08.627 IST [122456] LOG: consistent recovery state reached at 0/3000000
> >
> > Next, I will investigate, without a fix on v11 (maybe v12, v10..) why it is not hitting the defect location at all. And after that, I will check the status on other older versions.
>
> Reason for the problem was that the "-Xnone" parameter was not
> accepted by "sub backup" in PostgresNode.pm so I created that for
> backpatch. With attached patches I am to make it pass in v12,v11,v10
> (with fix) and fail (without fix). However, we will have to make some
> change for 9.6 because pg_basebackup doesn't support -Xnone on 9.6,
> maybe we can delete the content from pg_wal after the backup, if we
> think that approach looks fine then I will make the changes for 9.6 as
> well.
>
> Note: for param backport for v12 and v11 same patch getting applied
> but for v10 due to some conflict we need a separate patch (both
> attached).

I have fixed it for 9.6 as well by removing the wal from the xlog
directory. Attaching all the patches in single mail to avoid
confusion.

Note:
v7-0001 applies to master, v13,v12 (but for v12 before this we need to
apply backport)
v12-v8-0001-Backport is same as v11-v8-0001-Backport (duplicated for
version wise separation)
v11-v8-0002 is same as v10-v8-0002

Basically, for v12 and v11 same backport patch works and for V11 and
V10 same main patch works, still I duplicated them to avoid confusion.
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
9.6-v8-0001-Back-port-a-few-PostgresNode.pm-methods.patch text/x-patch 3.6 KB
9.6-v8-0002-Fix-corner-case-failure-of-new-standby-to-follow-.patch text/x-patch 7.5 KB
11-v8-0001-Back-port-backup-param-in-PostgresNode.pm.patch text/x-patch 1.0 KB
10-v8-0002-Fix-corner-case-failure-of-new-standby-to-follow-.patch text/x-patch 7.3 KB
10-v8-0001-Back-port-backup-param-in-PostgresNode.pm.patch text/x-patch 1.0 KB
11-v8-0002-Fix-corner-case-failure-of-new-standby-to-follow-.patch text/x-patch 7.3 KB
12-v8-0001-Back-port-backup-param-in-PostgresNode.pm.patch text/x-patch 1.0 KB
v7-0001-Fix-corner-case-failure-of-new-standby-to-follow-.patch text/x-patch 7.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message osumi.takamichi@fujitsu.com 2021-06-09 10:21:14 RE: locking [user] catalog tables vs 2pc vs logical rep
Previous Message Amit Kapila 2021-06-09 09:29:52 Re: Logical replication keepalive flood