Hi,

I've noticed a minor inconsistency in the output of pg_aios.

According to the documentation, the values for 'operation' are described as:

  <literal>readv</literal>, a vectored read
  ...
  <literal>writev</literal>, a vectored write

However, in actual output, they appear as read and write -- without the trailing v:

  =# select operation from pg_aios;
  ..
  operation       | read

While this discrepancy is unlikely to cause any real issues, it would be better to keep the naming consistent.

I was a bit unsure which form to align to.
There are currently no other types of read/write operations in pg_aios, so the shorter form might have been sufficient. However, using the 'v'-suffixed names makes the vectored nature of these operations explicit and future-proofs
the naming in case other variants are introduced later.


What do you think?

Best regards,

--
Regards,

--
Atsushi Torikoshi
Seconded from NTT DATA GROUP CORPORATION to SRA OSS K.K.
From 71c5d0b8f1a67026e8db2e7ee27ce18f6e0689e0 Mon Sep 17 00:00:00 2001
From: Atsushi Torikoshi <toriko...@sraoss.co.jp>
Date: Wed, 21 May 2025 10:50:53 +0900
Subject: [PATCH v1] Adjust pg_aios operation names to match documentation

pg_aios output currently shows 'read' and 'write' for
vectored I/O operations, while the documentation
refers to them as 'readv' and 'writev'.
This patch updates the output to use the 'v'-suffixed
forms for consistency.
---
 src/backend/storage/aio/aio_io.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/storage/aio/aio_io.c b/src/backend/storage/aio/aio_io.c
index 00e176135a..520b5077df 100644
--- a/src/backend/storage/aio/aio_io.c
+++ b/src/backend/storage/aio/aio_io.c
@@ -181,9 +181,9 @@ pgaio_io_get_op_name(PgAioHandle *ioh)
 		case PGAIO_OP_INVALID:
 			return "invalid";
 		case PGAIO_OP_READV:
-			return "read";
+			return "readv";
 		case PGAIO_OP_WRITEV:
-			return "write";
+			return "writev";
 	}
 
 	return NULL;				/* silence compiler */

base-commit: a6060f1cbec39575634043baeeaeb11e86042fa6
-- 
2.43.0

Reply via email to