pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Call pqPipelineFlush from PQsendFlushRequest 4+ messages / 1 participants [nested] [flat]
* pgsql: Call pqPipelineFlush from PQsendFlushRequest @ 2023-11-08 15:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2023-11-08 15:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@jeltef.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(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Call pqPipelineFlush from PQsendFlushRequest @ 2023-11-08 15:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2023-11-08 15:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@jeltef.nl> Discussion: https://postgr.es/m/CAGECzQTxZRevRWkKodE-SnJk1Yfm4eKT+8E4Cyq3MJ9YKTnNew@mail.gmail.com Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/99fa98766fa59270083606d9386386c3e7131a7a Modified Files -------------- src/interfaces/libpq/fe-exec.c | 8 ++++++++ 1 file changed, 8 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Call pqPipelineFlush from PQsendFlushRequest @ 2023-11-08 15:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2023-11-08 15:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@jeltef.nl> Discussion: https://postgr.es/m/CAGECzQTxZRevRWkKodE-SnJk1Yfm4eKT+8E4Cyq3MJ9YKTnNew@mail.gmail.com Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/42f8326851fd7b4fe1fcf9808785001c8da8173c Modified Files -------------- src/interfaces/libpq/fe-exec.c | 8 ++++++++ 1 file changed, 8 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Call pqPipelineFlush from PQsendFlushRequest @ 2023-11-08 15:55 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2023-11-08 15:55 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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@jeltef.nl> Discussion: https://postgr.es/m/CAGECzQTxZRevRWkKodE-SnJk1Yfm4eKT+8E4Cyq3MJ9YKTnNew@mail.gmail.com Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0e28091d5507bd63d5ad51e9795dd368aa4c7c4c Modified Files -------------- src/interfaces/libpq/fe-exec.c | 8 ++++++++ 1 file changed, 8 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2023-11-08 15:55 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-11-08 15:55 pgsql: Call pqPipelineFlush from PQsendFlushRequest Alvaro Herrera <alvherre@alvh.no-ip.org> 2023-11-08 15:55 pgsql: Call pqPipelineFlush from PQsendFlushRequest Alvaro Herrera <alvherre@alvh.no-ip.org> 2023-11-08 15:55 pgsql: Call pqPipelineFlush from PQsendFlushRequest Alvaro Herrera <alvherre@alvh.no-ip.org> 2023-11-08 15:55 pgsql: Call pqPipelineFlush from PQsendFlushRequest Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox