pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: laurenz.albe@cybertec.at
Cc: sri@ebi.ac.uk
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Could not read from file "pg_subtrans/00F5" at offset 122880: Success.
Date: Wed, 29 Nov 2023 18:29:15 +0100
Message-ID: <202311291729.d375fgxfxmlp@alvherre.pgsql> (raw)
In-Reply-To: <20231128.175443.1171037512392479311.horikyota.ntt@gmail.com>

On 2023-Nov-28, Kyotaro Horiguchi wrote:

> By the way, just out of curiosity, but errno should not be zero at the
> time the message above was output, yet "%m" is showing "success",
> which implies errno = 0 in Linux. How can that happen?

If the file is exactly of the length given then seek will work, and read
will not set errno but return a length of 0 bytes.  So
SlruPhysicalReadPage sets SLRU_READ_FAILED and then in pg11 the %m in
SlruReportIOError expands to "Success".

The code in master is completely different (it uses pg_pread rather than
seek + read): it does test for errno and reports accordingly.

So, nothing to do here.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/





view thread (9+ messages)  latest in thread

Message-ID: <202311291729.d375fgxfxmlp@alvherre.pgsql>
Permalink:  ../202311291729.d375fgxfxmlp@alvherre.pgsql/
Also on:    postgresql.org/message-id/202311291729.d375fgxfxmlp@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, horikyota.ntt@gmail.com, laurenz.albe@cybertec.at, sri@ebi.ac.uk, pgsql-general@lists.postgresql.org
  Subject: Re: Could not read from file "pg_subtrans/00F5" at offset 122880: Success.
  In-Reply-To: <202311291729.d375fgxfxmlp@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox