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

Commit2ea4b29

Browse files
committed
Fix typos and incorrect type in read_stream.c
max_ios should be int rather than int16, otherwise there's not muchpoint in doing:max_ios = Min(max_ios, PG_INT16_MAX);Discussion:https://postgr.es/m/CAApHDvr9Un-XpDr_+AFdOGM38O2K8SpfoHimqZ838gguTGYBiQ@mail.gmail.com
1 parent5cd72cc commit2ea4b29

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/backend/storage/aio/read_stream.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
*
2727
* B) I/O is necessary, but fadvise is undesirable because the access is
2828
* sequential, or impossible because direct I/O is enabled or the system
29-
* doesn't supportadvice. There is no benefit in looking ahead more than
30-
* io_combine_limit, because in this case only goal is larger read system
29+
* doesn't supportfadvise. There is no benefit in looking ahead more than
30+
* io_combine_limit, because in this casetheonly goal is larger read system
3131
* calls. Looking further ahead would pin many buffers and perform
3232
* speculative work looking ahead for no benefit.
3333
*
34-
* C) I/O isnecesssary, it appears random, and this system supports fadvise.
34+
* C) I/O isnecessary, it appears random, and this system supports fadvise.
3535
* We'll look further ahead in order to reach the configured level of I/O
3636
* concurrency.
3737
*
@@ -418,7 +418,7 @@ read_stream_begin_relation(int flags,
418418
ReadStream*stream;
419419
size_tsize;
420420
int16queue_size;
421-
int16max_ios;
421+
intmax_ios;
422422
intstrategy_pin_limit;
423423
uint32max_pinned_buffers;
424424
Oidtablespace_id;
@@ -447,6 +447,8 @@ read_stream_begin_relation(int flags,
447447
max_ios=get_tablespace_maintenance_io_concurrency(tablespace_id);
448448
else
449449
max_ios=get_tablespace_io_concurrency(tablespace_id);
450+
451+
/* Cap to INT16_MAX to avoid overflowing below */
450452
max_ios=Min(max_ios,PG_INT16_MAX);
451453

452454
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp