mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08:00
Fixup for prefetching support on macOS
The new code path (commit 6654bb9204
) should call FileAccess() first,
like the posix_fadvise() path.
Reported-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/0827edec-1317-4917-a186-035eb1e3241d%40eisentraut.org
This commit is contained in:
parent
640178c92e
commit
d7fe02fb9e
@ -2110,6 +2110,10 @@ retry:
|
||||
} ra;
|
||||
int returnCode;
|
||||
|
||||
returnCode = FileAccess(file);
|
||||
if (returnCode < 0)
|
||||
return returnCode;
|
||||
|
||||
ra.ra_offset = offset;
|
||||
ra.ra_count = amount;
|
||||
pgstat_report_wait_start(wait_event_info);
|
||||
|
Loading…
Reference in New Issue
Block a user