From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Call pqPipelineFlush from PQsendFlushRequest |
Date: | 2023-11-08 15:55:19 |
Message-ID: | E1r0ktj-004V6V-1v@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Call pqPipelineFlush from PQsendFlushRequest
When PQsendFlushRequest() was added by commit 69cf1d5429d4, we argued
against adding a PQflush() call in it[1]. This is still the right
decision: if the user wants a flush to occur, they can just call that.
However, we failed to realize that the message bytes could still be
given to the kernel for transmitting when this can be made without
blocking. That's what pqPipelineFlush() does, and it is done for every
single other message type sent by libpq, so do that.
(When the socket is in blocking mode this may indeed block, but that's
what all the other libpq message-sending routines do, too.)
[1] https://www.postgresql.org/message-id/202106252352.5ca4byasfun5%40alvherre.pgsql
Author: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Discussion: https://postgr.es/m/CAGECzQTxZRevRWkKodE-SnJk1Yfm4eKT+8E4Cyq3MJ9YKTnNew@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1a5594b95762a3c1d3a670881ee7f3c5679a1642
Modified Files
--------------
src/interfaces/libpq/fe-exec.c | 8 ++++++++
1 file changed, 8 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-11-08 17:01:44 | pgsql: Fix some issues with tracking nesting level in pg_stat_statement |
Previous Message | Daniel Gustafsson | 2023-11-08 13:06:09 | Re: pgsql: Clean up role created in new subscription test. |