Re: HAVE_WORKING_LINK still needed? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: HAVE_WORKING_LINK still needed?
Date
Msg-id 20200228150323.GA30707@alvherre.pgsql
Whole thread Raw
In response to HAVE_WORKING_LINK still needed?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Resume vacuum and autovacuum from interruption and cancellation
Next
From: legrand legrand
Date:
Subject: Re: Planning counters in pg_stat_statements (using pgss_store)