summaryrefslogtreecommitdiff
path: root/src/include/storage/md.h
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2023-12-16 16:14:47 +1300
committerThomas Munro <tmunro@postgresql.org>2023-12-16 17:51:21 +1300
commitb485ad7f07c80efbfd47329f138f0fe3a5acf013 (patch)
tree033c507f439b762b4f6ee6db9d034733706fd4c3 /src/include/storage/md.h
parent59bd34c2fa02b005dc33190245b2bffc6a08c0b9 (diff)
Provide multi-block smgrprefetch().
Previously smgrprefetch() could issue POSIX_FADV_WILLNEED advice for a single block at a time. Add an nblocks argument so that we can do the same for a range of blocks. This usually produces a single system call, but might need to loop if it crosses a segment boundary. Initially it is only called with nblocks == 1, but proposed patches will make wider calls. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> (earlier version) Discussion: https://postgr.es/m/CA+hUKGJkOiOCa+mag4BF+zHo7qo=o9CFheB8=g6uT5TUm2gkvA@mail.gmail.com
Diffstat (limited to 'src/include/storage/md.h')
-rw-r--r--src/include/storage/md.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/storage/md.h b/src/include/storage/md.h
index 941879ee6a8..091784c171e 100644
--- a/src/include/storage/md.h
+++ b/src/include/storage/md.h
@@ -31,7 +31,7 @@ extern void mdextend(SMgrRelation reln, ForkNumber forknum,
extern void mdzeroextend(SMgrRelation reln, ForkNumber forknum,
BlockNumber blocknum, int nblocks, bool skipFsync);
extern bool mdprefetch(SMgrRelation reln, ForkNumber forknum,
- BlockNumber blocknum);
+ BlockNumber blocknum, int nblocks);
extern void mdread(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
void *buffer);
extern void mdwrite(SMgrRelation reln, ForkNumber forknum,