Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: cca5507 <cca5507(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Historic snapshot doesn't track txns committed in BUILDING_SNAPSHOT state
Date: 2024-06-10 07:57:20
Message-ID: Zmax4EfDk67g1LVl@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 09, 2024 at 11:21:52PM +0800, cca5507 wrote:
> Hello hackers, I found that we&nbsp;currently don't track txns committed in
> BUILDING_SNAPSHOT state because of the code in xact_decode():
> /*
> * If the snapshot isn't yet fully built, we cannot decode anything, so
> * bail out.
> */
> if (SnapBuildCurrentState(builder) < SNAPBUILD_FULL_SNAPSHOT)
> return;
>
> The output of pub's log:
> ERROR: could not map filenumber "base/5/16395" to relation OID
>
> Is this a bug? Should we also track the txns committed in BUILDING_SNAPSHOT state?

Clearly, this is not an error you should be able to see as a user. So
yes, that's something that needs to be fixed.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-06-10 08:01:50 Re: Proposal to add page headers to SLRU pages
Previous Message Bertrand Drouvot 2024-06-10 07:19:56 Re: Proposal to add page headers to SLRU pages