diff options
author | Andres Freund <andres@anarazel.de> | 2025-03-29 14:45:42 -0400 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2025-03-29 14:45:42 -0400 |
commit | 08ccd56ac765496a152ba50cf0ae743c39396f52 (patch) | |
tree | fd044b7ad303e9fb90ef956d9d38206ec193b610 /src/backend/storage/buffer/bufmgr.c | |
parent | 50cb7505b3010736b9a7922e903931534785f3aa (diff) | |
download | postgresql-08ccd56ac765496a152ba50cf0ae743c39396f52.tar.gz postgresql-08ccd56ac765496a152ba50cf0ae743c39396f52.zip |
aio, bufmgr: Comment fixes/improvements
Some of these comments have been wrong for a while (12f3867f5534), some I
recently introduced (da7226993fd, 55b454d0e14). This includes an update to a
comment in FlushBuffer(), which will be copied in a future commit.
These changes seem big enough to be worth doing in separate commits.
Suggested-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/20250319212530.80.nmisch@google.com
Diffstat (limited to 'src/backend/storage/buffer/bufmgr.c')
-rw-r--r-- | src/backend/storage/buffer/bufmgr.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 5cac8cd7389..03317b49025 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -3929,9 +3929,10 @@ FlushBuffer(BufferDesc *buf, SMgrRelation reln, IOObject io_object, XLogFlush(recptr); /* - * Now it's safe to write buffer to disk. Note that no one else should - * have been able to write it while we were busy with log flushing because - * only one process at a time can set the BM_IO_IN_PROGRESS bit. + * Now it's safe to write the buffer to disk. Note that no one else should + * have been able to write it, while we were busy with log flushing, + * because we got the exclusive right to perform I/O by setting the + * BM_IO_IN_PROGRESS bit. */ bufBlock = BufHdrGetBlock(buf); @@ -5499,9 +5500,6 @@ IsBufferCleanupOK(Buffer buffer) /* * Functions for buffer I/O handling * - * Note: We assume that nested buffer I/O never occurs. - * i.e at most one BM_IO_IN_PROGRESS bit is set per proc. - * * Also note that these are used only for shared buffers, not local ones. */ |