On 2020-Feb-28, Peter Eisentraut wrote:
> @@ -788,7 +788,6 @@ durable_link_or_rename(const char *oldfile, const char *newfile, int elevel)
> if (fsync_fname_ext(oldfile, false, false, elevel) != 0)
> return -1;
>
> -#ifdef HAVE_WORKING_LINK
> if (link(oldfile, newfile) < 0)
> {
> ereport(elevel,
> @@ -798,17 +797,6 @@ durable_link_or_rename(const char *oldfile, const char *newfile, int elevel)
> return -1;
> }
> unlink(oldfile);
> -#else
> - /* XXX: Add racy file existence check? */
> - if (rename(oldfile, newfile) < 0)
Maybe rename durable_link_or_rename to just durable_link?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services