Re: Unhappy about API changes in the no-fsm-for-small-rels patch - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unhappy about API changes in the no-fsm-for-small-rels patch
Date
Msg-id 29729.1556040685@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unhappy about API changes in the no-fsm-for-small-rels patch  (Andres Freund <andres@anarazel.de>)
Responses Re: Unhappy about API changes in the no-fsm-for-small-rels patch
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-04-23 15:46:17 +0530, Amit Kapila wrote:
>> If we invalidate it only when there's no space on the page, then when
>> should we set it back to available, because if we don't do that, then
>> we might miss the space due to concurrent deletes.

> Well, deletes don't traditionally (i.e. with an actual FSM) mark free
> space as available (for heap). I think RecordPageWithFreeSpace() should
> issue a invalidation if there's no FSM, and the block goes from full to
> empty (as there's no half-full IIUC).

Why wouldn't we implement this just as a mini four-entry FSM stored in
the relcache, and update the entries according to the same rules we'd
use for regular FSM entries?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: Trouble with FETCH_COUNT and combined queries in psql
Next
From: Shawn Debnath
Date:
Subject: Re: POC: Cleaning up orphaned files using undo logs