On Thu, 14 Mar 2024 at 13:12, Robert Haas <robertmh...@gmail.com> wrote: > > On Thu, Mar 14, 2024 at 7:22 AM Melih Mutlu <m.melihmu...@gmail.com> wrote: > > 1- Even though I expect both the patch and HEAD behave similarly in case of > > small data (case 1: 100 bytes), the patch runs slightly slower than HEAD. > > I wonder why this happens. It seems like maybe something that could be fixed.
some wild guesses: 1. maybe it's the extra call overhead of the new internal_flush implementation. What happens if you make that an inline function? 2. maybe swap these conditions around (the call seems heavier than a simple comparison): !pq_is_send_pending() && len >= PqSendBufferSize BTW, the improvements for the larger rows are awesome!