Re: Flushing large data immediately in pqcomm - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Flushing large data immediately in pqcomm
Date
Msg-id CAGECzQT9gH6uUd9pnTC=NB7TSwiTsO3kxYH5BXraSy3549Oe_g@mail.gmail.com
Whole thread Raw
In response to Re: Flushing large data immediately in pqcomm  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Flushing large data immediately in pqcomm
List pgsql-hackers
On Thu, 14 Mar 2024 at 13:12, Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Thu, Mar 14, 2024 at 7:22 AM Melih Mutlu <m.melihmutlu@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
patchruns 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!



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Inconsistent printf placeholders
Next
From: Robert Haas
Date:
Subject: Re: [PATCH] LockAcquireExtended improvement