From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Two noncritical bugs of pg_waldump |
Date: | 2022-02-25 18:48:47 |
Message-ID: | 20220225184847.ft7wn6e6diflz5fi@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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...
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | David Christensen | 2022-02-25 18:56:16 | Re: [PATCH] add relation and block-level filtering to pg_waldump |
Previous Message | Bruce Momjian | 2022-02-25 18:48:05 | Re: Using operators to do query hints |