Re: [Patch] Optimize dropping of relation buffers using dlist
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: tsunakawa.takay@fujitsu.com
Cc: k.jamison@fujitsu.com, amit.kapila16@gmail.com, tgl@sss.pgh.pa.us,
andres@anarazel.de, robertmhaas@gmail.com, tomas.vondra@2ndquadrant.com,
pgsql-hackers@postgresql.org
Date: 2020-10-01T03:17:54Z
Lists: pgsql-hackers
At Thu, 1 Oct 2020 02:40:52 +0000, "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com> wrote in > With the following code, when the main fork does not meet the > optimization criteria, other forks are not optimized as well. You > want to determine each fork's optimization separately, don't you? In more detail, if smgrcachednblocks() returned InvalidBlockNumber for any of the forks, we should give up the optimization at all since we need to run a full scan anyway. On the other hand, if any of the forks is smaller than the threshold, we still can use the optimization when we know the accurate block number of all the forks. Still, I prefer to use total block number of all forks since we anyway visit the all forks. Is there any reason to exlucde forks other than the main fork while we visit all of them already? regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
Fix size overflow in calculation introduced by commits d6ad34f3 and bea449c6.
- 519e4c9ee21a 14.0 landed
-
Optimize DropRelFileNodesAllBuffers() for recovery.
- bea449c635c0 14.0 landed
-
Optimize DropRelFileNodeBuffers() for recovery.
- d6ad34f3410f 14.0 landed
-
Cache smgrnblocks() results in recovery.
- c5315f4f4484 14.0 cited
-
Add a check to prevent overwriting valid data if smgrnblocks() gives a
- ffae5cc5a602 8.2.0 cited