Re: Flushing large data immediately in pqcomm

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Flushing large data immediately in pqcomm
Date: 2024-03-21 09:58:40
Message-ID: CAGECzQTgup-uK9YXTM+24ib4VVk93RW_Stsh3KtHGZnrCybdyA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 21 Mar 2024 at 01:24, Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com> wrote:
> What if I do a simple comparison like PqSendStart == PqSendPointer instead of calling pq_is_send_pending()

Yeah, that sounds worth trying out. So the new suggestions to fix the
perf issues on small message sizes would be:

1. add "inline" to internal_flush function
2. replace pq_is_send_pending() with PqSendStart == PqSendPointer
3. (optional) swap the order of PqSendStart == PqSendPointer and len
>= PqSendBufferSize

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2024-03-21 10:00:00 Re: Test 031_recovery_conflict.pl is not immune to autovacuum
Previous Message Andrew Dunstan 2024-03-21 09:51:18 Re: automating RangeTblEntry node support