Re: pgsql: Avoid creation of the free space map for small heap relations, t
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Kapila <akapila@postgresql.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-02-26T03:47:11Z
Lists: pgsql-hackers
On Mon, Feb 25, 2019 at 11:14 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > I wrote: > > Amit Kapila <akapila@postgresql.org> writes: > >> Avoid creation of the free space map for small heap relations, take 2. > > > I think this patch still has some issues. > > Just out of curiosity ... how can it possibly be even a little bit sane > that fsm_local_map is a single static data structure, without even any > indication of which table it is for? > It is just for finding a free block among a few blocks of relation. We clear this when we have found a block with enough free space, when we extend the relation, or on transaction abort. So, I think we don't need any per table information. > If, somehow, there's a rational argument for that design, why is it > not explained in freespace.c? The most charitable interpretation of > what I see there is that it's fatally undercommented. > There is some explanation in freespace.c and in README (src/backend/storage/freespace/README). I think we should add some more information where this data structure (FSMLocalMap) is declared. -- With Regards, Amit Kapila. EnterpriseDB: http://www.enterprisedb.com
Commits
-
Clear the local map when not used.
- 9c32e4c35026 12.0 landed
-
Remove unneeded argument from _bt_getstackbuf().
- 2ab23445bc6a 12.0 cited
-
Avoid creation of the free space map for small heap relations, take 2.
- b0eaa4c51bbf 12.0 cited