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

Appearance settings
Discussion options

The default fetch size is 0. So Does R2DBC rely on TCP back pressure?
If not, how does it work?

You must be logged in to vote

Replies: 1 comment · 2 replies

Comment options

Yes, we use TCP back pressure (even if fetch size is set). This works by not reading from the TCP channel unless the driver sees more demand. That leaves TCP packets in recv buffers. As soon as these are full, the server saturates TCP send buffers. Then, the server needs to react to full send buffers by e.g. not sending more data.

You must be logged in to vote
2 replies
@kitkars
Comment options

Hi Mark.. 1 follow up question if you do not mind. When the receiver & sender buffer are full, does postgres db server know how to react? For ex: If a client does a "select * from users" with 100 million records with r2dbc and too slow to consume, the receiver buffer will become full with, say, 1000 records. In this case, postgres will not send any more data? Not sure what kind of negative impact a db server can have in this case! in terms of db resources etc.

@mp911de
Comment options

I don't know, that's an excellent question for https://www.postgresql.org/list/pgsql-general/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.