Re: pgsql: Add missing_ok option to the SQL functions for reading files. - Mailing list pgsql-committers

From Michael Paquier
Subject Re: pgsql: Add missing_ok option to the SQL functions for reading files.
Date
Msg-id CAB7nPqS=GTQpteX_2eY0XeGJ85EVA7CeA+tYF=YLEds3xj-LdA@mail.gmail.com
Whole thread Raw
In response to pgsql: Add missing_ok option to the SQL functions for reading files.  (Heikki Linnakangas <heikki.linnakangas@iki.fi>)
Responses Re: pgsql: Add missing_ok option to the SQL functions for reading files.  (Bruce Momjian <bruce@momjian.us>)
List pgsql-committers
On Mon, Jun 29, 2015 at 3:39 AM, Heikki Linnakangas
<heikki.linnakangas@iki.fi> wrote:
> Add missing_ok option to the SQL functions for reading files.
>
> This makes it possible to use the functions without getting errors, if there
> is a chance that the file might be removed or renamed concurrently.
> pg_rewind needs to do just that, although this could be useful for other
> purposes too. (The changes to pg_rewind to use these functions will come in
> a separate commit.)
>
> The read_binary_file() function isn't very well-suited for extensions.c's
> purposes anymore, if it ever was. So bite the bullet and make a copy of it
> in extension.c, tailored for that use case. This seems better than the
> accidental code reuse, even if it's a some more lines of code.

This has been done done as the part of a fix for the issues with
pg_rewind, but perhaps it should be mentioned in the release notes?
--
Michael


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: PL/Perl: Add alternative expected file for Perl 5.22
Next
From: Tom Lane
Date:
Subject: pgsql: Make numeric form of PG version number readily available in Make