Minor adjustment to pg_aios output naming
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.
Attachments:
v1-0001-Adjust-pg_aios-operation-names-to-match-documenta.patchtext/x-diff; name=v1-0001-Adjust-pg_aios-operation-names-to-match-documenta.patchDownload+2-3
On Wed, May 21, 2025 at 11:14:11AM +0900, torikoshia wrote:
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 writeHowever, in actual output, they appear as read and write -- without the
trailing v:=# select operation from pg_aios;
..
operation | readWhile 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?
--- 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";
}
I think that your suggestion of fix is right. The properties are
marked as "WRITEV" and "READV" for vectored operations. So the
documentation is right, not the name used in the code. Will fix,
thanks for the report.
--
Michael
On Tue, May 20, 2025 at 10:45 PM Michael Paquier <michael@paquier.xyz> wrote:
I think that your suggestion of fix is right. The properties are
marked as "WRITEV" and "READV" for vectored operations. So the
documentation is right, not the name used in the code. Will fix,
thanks for the report.
Since this was Andres's commit, I think it would have been a good idea
to give at least 24 hours, or better yet a couple of days, for him to
comment before committing something.
--
Robert Haas
EDB: http://www.enterprisedb.com
On Wed, May 21, 2025 at 03:43:01PM -0400, Robert Haas wrote:
Since this was Andres's commit, I think it would have been a good idea
to give at least 24 hours, or better yet a couple of days, for him to
comment before committing something.
Thanks for the poke, sorry about that. I'll be more careful with my
timings.
--
Michael
Hi,
On 2025-05-21 15:43:01 -0400, Robert Haas wrote:
On Tue, May 20, 2025 at 10:45 PM Michael Paquier <michael@paquier.xyz> wrote:
I think that your suggestion of fix is right. The properties are
marked as "WRITEV" and "READV" for vectored operations. So the
documentation is right, not the name used in the code. Will fix,
thanks for the report.Since this was Andres's commit, I think it would have been a good idea
to give at least 24 hours, or better yet a couple of days, for him to
comment before committing something.
I think the change is fine, but I was also a bit surprised about the speed the
change went in...
Greetings,
Andres Freund