Re: Unhappy about API changes in the no-fsm-for-small-rels patch
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org, John Naylor <john.naylor@2ndquadrant.com>, Amit Kapila <amit.kapila16@gmail.com>
Date: 2019-04-16T19:16:25Z
Lists: pgsql-hackers
Hi, On 2019-04-16 14:31:25 -0400, Tom Lane wrote: > Andres Freund <andres@anarazel.de> writes: > > I'm kinda thinking that this is the wrong architecture. > > The bits of that patch that I've looked at seemed like a mess > to me too. AFAICT, it's trying to use a single global "map" > for all relations (strike 1) without any clear tracking of > which relation the map currently describes (strike 2). Well, strike 2 basically is not a problem right now, because the map is cleared whenever a search for a target buffer succeeded. But that has pretty obvious efficiency issues... > This can only work at all if an inaccurate map is very fail-soft, > which I'm not convinced it is I think it better needs to be fail-soft independent of this the no-fsm patch. Because the fsm is not WAL logged etc, it's pretty easy to get a pretty corrupted version. And we better deal with that. > and in any case it seems pretty inefficient for workloads that insert > into multiple tables. As is, it's inefficient for insertions into a *single* relation. The RelationGetTargetBlock() makes it not crazily expensive, but it's still plenty expensive. > I'd have expected any such map to be per-table and be stored in > the relcache. Same. Greetings, Andres Freund
Commits
-
Revert "Avoid the creation of the free space map for small heap relations".
- 7db0cde6b58e 12.0 landed
-
Improve code comments in b0eaa4c51b.
- 06c8a5090ed9 12.0 cited
-
During pg_upgrade, conditionally skip transfer of FSMs.
- 13e8643bfc29 12.0 cited
-
Add more tests for FSM.
- 6f918159a97a 12.0 cited
-
Fix typos in commit 8586bf7ed8.
- a6e48da08844 12.0 cited
-
tableam: introduce table AM infrastructure.
- 8586bf7ed888 12.0 cited
-
Clear the local map when not used.
- 9c32e4c35026 12.0 cited
-
Doc: Update the documentation for FSM behavior for small tables.
- 29d108cdecbe 12.0 cited
-
Make FSM test portable.
- 08ecdfe7e5e0 12.0 cited
-
Avoid creation of the free space map for small heap relations, take 2.
- b0eaa4c51bbf 12.0 cited