Skip to content

Commit e19dc74

Browse files
committed
aio: Minor comment improvements
Reviewed-by: Noah Misch <noah@leadboat.com> Discussion: https://postgr.es/m/usbwzckj7q3jhfx3ann3nrfnukmupbs35axvq5zfyeo6nvrzrm@onjhxs2du4st
1 parent fdd146a commit e19dc74

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/backend/storage/smgr/md.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ md_readv_complete(PgAioHandle *ioh, PgAioResult prior_result, uint8 cb_data)
19811981
* might not process the query result immediately (because it is busy
19821982
* doing another part of query processing) or at all (e.g. if it was
19831983
* cancelled or errored out due to another IO also failing). The
1984-
* issuer of the IO will emit an ERROR when processing the IO's
1984+
* definer of the IO will emit an ERROR when processing the IO's
19851985
* results
19861986
*/
19871987
pgaio_result_report(result, td, LOG_SERVER_ONLY);

src/backend/storage/smgr/smgr.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,14 @@ smgrreadv(SMgrRelation reln, ForkNumber forknum, BlockNumber blocknum,
738738
* blocks not successfully read might bear unspecified modifications, up to
739739
* the full nblocks). This maintains the abstraction that smgr operates on the
740740
* level of blocks, rather than bytes.
741+
*
742+
* Compared to smgrreadv(), more responsibilities fall on the caller:
743+
* - Partial reads need to be handled by the caller re-issuing IO for the
744+
* unread blocks
745+
* - smgr will ereport(LOG_SERVER_ONLY) some problems, but higher layers are
746+
* responsible for pgaio_result_report() to mirror that news to the user (if
747+
* the IO results in PGAIO_RS_WARNING) or abort the (sub)transaction (if
748+
* PGAIO_RS_ERROR).
741749
*/
742750
void
743751
smgrstartreadv(PgAioHandle *ioh,

0 commit comments

Comments
 (0)