The patch looks almost good except for the minor ones: (1) + for (i = 0; i < nnodes; i++) + { + RelFileNodeBackend rnode = smgr_reln[i]->smgr_rnode; + + rnodes[i] = rnode; + }
You can write: + for (i = 0; i < nnodes; i++) + rnodes[i] = smgr_reln[i]->smgr_rnode; (2) + if (!accurate || j >= MAX_FORKNUM || The correct condition would be: + if (j <= MAX_FORKNUM || because j becomes MAX_FORKNUM + 1 if accurate sizes for all forks could be obtained. If any fork's size is inaccurate, j is <= MAX_FORKNUM when exiting the loop, so you don't need to test for accurate flag. (3) + { + goto buffer_full_scan; + return; + } return after goto cannot be reached, so this should just be: + goto buffer_full_scan; Regards Takayuki Tsunakawa