On Thu, Mar 11, 2021 at 9:46 AM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote:
> Regarding the 2% slack logic, could we change it to use increments of > line pointers instead? That makes it more clear what problem this > solution is trying to work around; that is to say line pointers not > (all) being truncated away. The currently subtracted value accounts That makes sense. > ... > - if (len + saveFreeSpace > MaxHeapTupleSize) > + if (len + saveFreeSpace > maxPaddedFsmRequest) > ... > - targetFreeSpace = Max(len, MaxHeapTupleSize - (MaxHeapTupleSize * 2 / 100)); > + targetFreeSpace = Max(len, maxPaddedFsmRequest); > ... If we have that convenient constant, it seems equivalent (I think) and a bit more clear to write it this way, but I'm not wedded to it: if (len + saveFreeSpace > MaxHeapTupleSize && len <= maxPaddedFsmRequest) { ... targetFreeSpace = maxPaddedFsmRequest; } else targetFreeSpace = len + saveFreeSpace; Also, should I write a regression test for it? The test case is already available, just no obvious place to put it. -- John Naylor EDB: http://www.enterprisedb.com