Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Adjust operation names of pg_aios to match the documentation

  1. Minor adjustment to pg_aios output naming

    torikoshia <torikoshia@oss.nttdata.com> — 2025-05-21T02:14:11Z

    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.
  2. Re: Minor adjustment to pg_aios output naming

    Michael Paquier <michael@paquier.xyz> — 2025-05-21T02:45:24Z

    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 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?
    
    --- 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
    
  3. Re: Minor adjustment to pg_aios output naming

    Robert Haas <robertmhaas@gmail.com> — 2025-05-21T19:43:01Z

    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
    
    
    
    
  4. Re: Minor adjustment to pg_aios output naming

    Michael Paquier <michael@paquier.xyz> — 2025-05-22T00:02:25Z

    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
    
  5. Re: Minor adjustment to pg_aios output naming

    Andres Freund <andres@anarazel.de> — 2025-05-22T16:54:14Z

    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
    
    
    
    
  6. Re: Minor adjustment to pg_aios output naming

    Atsushi Torikoshi <torikoshia.tech@gmail.com> — 2025-05-23T11:36:04Z

    Anyway, thanks for the review!
    
    --
    Atsushi Torikoshi