Re: pg_upgrade errno

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_upgrade errno
Date: 2022-07-31 23:39:10
Message-ID: YucSnskQnxLc4ANF@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jul 31, 2022 at 08:41:35AM -0500, Justin Pryzby wrote:
> Since 3a769d823 (pg_upgrade: Allow use of file cloning)
> file.c has had:
>
> - if (ioctl(dest_fd, FICLONE, src_fd) < 0)
> - {
> - unlink(dst);
> - pg_fatal("error while cloning relation \"%s.%s\" (\"%s\" to \"%s\"): %s",
> - schemaName, relName, src, dst, strerror(errno));
> - }
>
> But errno should be saved before strerror/%m.

Good catch, Justin. Will fix on HEAD.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-07-31 23:43:25 Re: pg_upgrade errno
Previous Message PG Doc comments form 2022-07-31 23:37:03 Typo in "43.9.1. Reporting Errors and Messages"?