Re: Two noncritical bugs of pg_waldump

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: andres(at)anarazel(dot)de
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Two noncritical bugs of pg_waldump
Date: 2022-03-02 08:37:04
Message-ID: 20220302.173704.1989463761084318834.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 25 Feb 2022 10:48:47 -0800, Andres Freund <andres(at)anarazel(dot)de> wrote in
> Hi,
>
> On 2022-02-14 18:18:47 +0900, Kyotaro Horiguchi wrote:
> > > If I give an empty file to the tool it complains as the follows.
> > >
> > > > pg_waldump: fatal: could not read file "hoge": No such file or directory
> > >
> > > No, the file exists. The cause is it reads uninitialized errno to
> > > detect errors from the system call. read(2) is defined to set errno
> > > always when it returns -1 and doesn't otherwise. Thus it seems to me
> > > that it is better to check that the return value is less than zero
> > > than to clear errno before the call to read().
> >
> > So I post a patch contains only the indisputable part.
>
> Thanks for the report and fix. Pushed. This was surprisingly painful, all but
> one branch had conflicts...

Ah, I didn't expect that this is committed so quickly. I should have
created patches for all versions. Anyway thanks for committing this!

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-03-02 08:55:20 Re: more descriptive message for process termination due to max_slot_wal_keep_size
Previous Message Peter Eisentraut 2022-03-02 08:32:26 Re: Proposal: Support custom authentication methods using hooks