aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-04-01 16:06:48 -0400
committerAndres Freund <andres@anarazel.de>2025-04-01 16:06:48 -0400
commite19dc74491e68e1df05c99c4937929cef3092a3b (patch)
tree42b4cd84ce00f44fac9f23e2baeb4b02121fbf3e
parentfdd146a8ef2bc0c24e8d27e3773feeb8ef0a9c25 (diff)
downloadpostgresql-e19dc74491e68e1df05c99c4937929cef3092a3b.tar.gz
postgresql-e19dc74491e68e1df05c99c4937929cef3092a3b.zip
aio: Minor comment improvements
Reviewed-by: Noah Misch <noah@leadboat.com> Discussion: https://postgr.es/m/usbwzckj7q3jhfx3ann3nrfnukmupbs35axvq5zfyeo6nvrzrm@onjhxs2du4st
-rw-r--r--src/backend/storage/smgr/md.c2
-rw-r--r--src/backend/storage/smgr/smgr.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index b39c9334656..f99c9d90013 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -1981,7 +1981,7 @@ md_readv_complete(PgAioHandle *ioh, PgAioResult prior_result, uint8 cb_data)
* might not process the query result immediately (because it is busy
* doing another part of query processing) or at all (e.g. if it was
* cancelled or errored out due to another IO also failing). The
- * issuer of the IO will emit an ERROR when processing the IO's
+ * definer of the IO will emit an ERROR when processing the IO's
* results
*/
pgaio_result_report(result, td, LOG_SERVER_ONLY);
diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c
index 320dc04d83a..4540284f581 100644
--- a/src/backend/storage/smgr/smgr.c
+++ b/src/backend/storage/smgr/smgr.c
@@ -738,6 +738,14 @@ smgrreadv(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
* blocks not successfully read might bear unspecified modifications, up to
* the full nblocks). This maintains the abstraction that smgr operates on the
* level of blocks, rather than bytes.
+ *
+ * Compared to smgrreadv(), more responsibilities fall on the caller:
+ * - Partial reads need to be handled by the caller re-issuing IO for the
+ * unread blocks
+ * - smgr will ereport(LOG_SERVER_ONLY) some problems, but higher layers are
+ * responsible for pgaio_result_report() to mirror that news to the user (if
+ * the IO results in PGAIO_RS_WARNING) or abort the (sub)transaction (if
+ * PGAIO_RS_ERROR).
*/
void
smgrstartreadv(PgAioHandle *ioh,