Re: Two issues leading to discrepancies in FSM data on the standby server

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, Alexey Makhmutov <a(dot)makhmutov(at)postgrespro(dot)ru>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Two issues leading to discrepancies in FSM data on the standby server
Date: 2026-09-13 12:10:58
Message-ID: CAPpHfdvdS3ny25_2korU=WQqLrP8-CK42b-2ga6qh6Fk4pmEUw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 12, 2026 at 11:05 PM Noah Misch <noah(at)leadboat(dot)com> wrote:
> On Mon, Sep 07, 2026 at 06:22:22PM +0300, Alexander Korotkov wrote:
> > 0002 is patch for FSM readme to highlight this aspect
> >
> > I'm going to push (and backpatch) 0001. 0002 needs review.
>
> > Subject: [PATCH v1 2/2] Say in the FSM README why its hint writes still need
> > full page images
>
> > +That RBM_ZERO_ON_ERROR is a property of this directory, not of the FSM fork
> > +itself. The files themselves are ordinary relation files, and plenty of code
> > +outside freespace.c reads them and does verify checksums:
> > +RelationCopyStorage(), which ALTER TABLE ... SET TABLESPACE runs over every
> > +fork; the read stream in RelationCopyStorageUsingBuffer(), used by
> > +CREATE DATABASE ... STRATEGY = wal_log; and the checksum verification in base
> > +backups and in pg_checksums. The last two are the reason this cannot simply be
> > +relaxed: an external verification tool has no way to tell a tear that we
> > +consider harmless from one caused by failing storage, so making it accept
> > +the former blinds it to the latter.
>
> One could relax the "last two" by having those tools skip checksum
> verification for *_fsm files, so let's not claim it's infeasible. It's true
> that this could miss failing-storage evidence that coincidentally landed in
> FSM, but accepting that could be the right thing someday. Other than that, I
> agree with this README change. Thanks.

I've corrected that paragraph. I'm going to push this to master if no
objections.

------
Regards,
Alexander Korotkov
Supabase

Attachment Content-Type Size
v2-0001-Say-in-the-FSM-README-why-its-hint-writes-still-n.patch application/octet-stream 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2026-09-13 12:16:20 Re: [BUG] ON CONFLICT DO UPDATE SET x = EXCLUDED.<virtual-generated-column> errors or silently writes NULL
Previous Message Dean Rasheed 2026-09-13 11:42:42 Re: SSI: ON CONFLICT DO SELECT takes no predicate lock on the returned row