aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/aio/read_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/aio/read_stream.c')
-rw-r--r--src/backend/storage/aio/read_stream.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/storage/aio/read_stream.c b/src/backend/storage/aio/read_stream.c
index d65fa07b44c..45bdf819d57 100644
--- a/src/backend/storage/aio/read_stream.c
+++ b/src/backend/storage/aio/read_stream.c
@@ -515,9 +515,10 @@ read_stream_begin_impl(int flags,
* finishes we don't want to have to wait for its buffers to be consumed
* before starting a new one.
*
- * Be careful not to allow int16 to overflow (even though that's not
- * possible with the current GUC range limits), allowing also for the
- * spare entry and the overflow space.
+ * Be careful not to allow int16 to overflow. That is possible with the
+ * current GUC range limits, so this is an artificial limit of ~32k
+ * buffers and we'd need to adjust the types to exceed that. We also have
+ * to allow for the spare entry and the overflow space.
*/
max_pinned_buffers = (max_ios + 1) * io_combine_limit;
max_pinned_buffers = Min(max_pinned_buffers,