Re: pgstattuple: fix free space calculation

Andreas Karlsson <andreas@proxel.se>

From: Andreas Karlsson <andreas@proxel.se>
To: Frédéric Yhuel <frederic.yhuel@dalibo.com>, Rafia Sabih <rafia.pghackers@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-08-30T12:06:14Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Consistently use PageGetExactFreeSpace() in pgstattuple.

On 8/29/24 4:53 PM, Frédéric Yhuel wrote:
> So I think we should just use PageGetExactFreeSpace().

I agree, I feel that is the least surprising behavior because we 
currently sum tiny amounts of free space that is unusable anyway. E.g. 
imagine one million pages with 10 free bytes each, that looks like 10 
free MB so I do not see why we should treat the max tuples per page case 
with any special logic.

Andreas