Re: The same 2PC data maybe recovered twice

From: "suyu(dot)cmj" <mengjuan(dot)cmj(at)alibaba-inc(dot)com>
To: "Michael Paquier" <michael(at)paquier(dot)xyz>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: The same 2PC data maybe recovered twice
Date: 2025-07-14 09:57:18
Message-ID: 60954f29-fcf1-4c1a-b836-0432be7536b9.mengjuan.cmj@alibaba-inc.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

> Actually, what you are doing is incorrect because we could miss some
> ERRORs for example if a base backup was incorrect if come files were
> present in pg_twophase?
Yes, you are right, base backup with incorrect files would be a problem.
> It's not really true that what you are changing here has no
> interaction with the beginning of recovery, the other thread is about
> the fact that reading the 2PC files from disk when !reachedConsistency
> is a bad concept that we should avoid, impacting the assumption the
> code path you are changing here relies on. At the end, it may be
> possible that we're able to remove this check entirely..
Is there any recent discussion or plan regarding this? I noticed that in the latest code branch, 2PC data on disk is still being restored when !reachedConsistency. If there are any updates or discussions, I would greatly appreciate it if you could let me know
Best regards

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Dmitry Kovalenko 2025-07-14 12:33:23 Re: BUG #18983: Problems with Postgres "make check" under ASAN
Previous Message Michael Paquier 2025-07-14 08:14:43 Re: The same 2PC data maybe recovered twice

Browse pgsql-hackers by date

  From Date Subject
Next Message Ajin Cherian 2025-07-14 09:59:52 Re: 024_add_drop_pub.pl might fail due to deadlock
Previous Message Amit Kapila 2025-07-14 09:53:47 Re: Logical replication prefetch