Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0e28091

Browse files
committed
Call pqPipelineFlush from PQsendFlushRequest
When PQsendFlushRequest() was added by commit69cf1d5, we arguedagainst adding a PQflush() call in it[1]. This is still the rightdecision: if the user wants a flush to occur, they can just call that.However, we failed to realize that the message bytes could still begiven to the kernel for transmitting when this can be made withoutblocking. That's what pqPipelineFlush() does, and it is done for everysingle other message type sent by libpq, so do that.(When the socket is in blocking mode this may indeed block, but that'swhat all the other libpq message-sending routines do, too.)[1]https://www.postgresql.org/message-id/202106252352.5ca4byasfun5%40alvherre.pgsqlAuthor: Jelte Fennema-Nio <postgres@jeltef.nl>Discussion:https://postgr.es/m/CAGECzQTxZRevRWkKodE-SnJk1Yfm4eKT+8E4Cyq3MJ9YKTnNew@mail.gmail.com
1 parent7e18c0b commit0e28091

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/interfaces/libpq/fe-exec.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3271,6 +3271,14 @@ PQsendFlushRequest(PGconn *conn)
32713271
return0;
32723272
}
32733273

3274+
/*
3275+
* Give the data a push (in pipeline mode, only if we're past the size
3276+
* threshold). In nonblock mode, don't complain if we're unable to send
3277+
* it all; PQgetResult() will do any additional flushing needed.
3278+
*/
3279+
if (pqPipelineFlush(conn)<0)
3280+
return0;
3281+
32743282
return1;
32753283
}
32763284

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp