pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: HAVE_WORKING_LINK still needed?
Date: Fri, 28 Feb 2020 12:03:23 -0300
Message-ID: <20200228150323.GA30707@alvherre.pgsql> (raw)
In-Reply-To: <72fff73f-dc9c-4ef4-83e8-d2e60c98df48@2ndquadrant.com>

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





view thread (7+ messages)  latest in thread

Message-ID: <20200228150323.GA30707@alvherre.pgsql>
Permalink:  ../20200228150323.GA30707@alvherre.pgsql/
Also on:    postgresql.org/message-id/20200228150323.GA30707@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@2ndquadrant.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: HAVE_WORKING_LINK still needed?
  In-Reply-To: <20200228150323.GA30707@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox