Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1j7nPP-000528-M0 for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 21:42:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j7nPN-0006GR-GO for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 21:42:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j7nLS-0005f5-BL for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2020 21:38:54 +0000 Received: from mail-yw1-xc36.google.com ([2607:f8b0:4864:20::c36]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j7nLP-0003Nv-LZ for pgsql-hackers@postgresql.org; Fri, 28 Feb 2020 21:38:53 +0000 Received: by mail-yw1-xc36.google.com with SMTP id f204so4749589ywc.10 for ; Fri, 28 Feb 2020 13:38:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=O8JYEitbriPRw9cCbDNbzmFeKWCFewzMdbl2kPrbHdA=; b=cf7xiCZ9WnrUbib0n3QaLSGt4i7v9yQp80O4pB9A2vxvqsBxCFAqFvzg79xE47pncC kixHY2sZZTdK5qUipEAngIgs9GhxYFB9K9UGeVxtUpz2Rh2dLFc5SOMsc33D4cUUkMch 3mqFFBek53B84pVAC7YQGkH8X6ngo0Kb1OcTe27vFNdJbtuVzSD5jy8R3zI94dAdo6pI aZZvw3IlvCZ4YAI3RGsoH1C4OpHzzYixjAvPXj/VaAf5oifAIhCVvvPBDE7IQX+lwMgl BcGligfB21sk4a087u+bhTIwaIWjQtVu+fmfM12LbE3QdZe2Npd7Kpui0/cCSjO9TG54 yXpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=O8JYEitbriPRw9cCbDNbzmFeKWCFewzMdbl2kPrbHdA=; b=jBjjc3GuwJG8jTSK5lSbrIApnW2ajWmFI28TEE4LxNTj9LkOOTwlIq+GUscZYIRJDw UGvjhuI4OdQv7DzSzG0a+z+xhX7z/LaFFO6FkKyNfrlU0bMU5lp09uSbvflVORRRkNfH Rpja5b9j/ccGW/S7M9og+QgRWAXyVTY938f3aokZlT082sQ0jT0zvaU8S9g4rXPD9RoT iPqYcYJX8W4XIA19lQzB+NRQt/3eLNQkt8MoG0nQgLMrCUQS7YOfEuanYnVF9Onuaktm ykL6XX3U0zu4iI6/VHoIsAD5IGpsuzgomcOTfyVV/EMMV0pyKs+VIGp4pa4PL0YB1qd1 8jwQ== X-Gm-Message-State: APjAAAUsojhKIrT7AmPm7rerKd1uMT+FTy6jvsftBm7uq4/LZ3E3QWYY 5ouLubM3yhMvCzlds4RXw0hxQg== X-Google-Smtp-Source: APXvYqy9PAmK9dk/KVwGGmgzN/liqLn2BC7DSq5j7Fg6NypMOf5tOM2IczGFd3DkGr9YBXimgMo7ww== X-Received: by 2002:a25:830d:: with SMTP id s13mr5911017ybk.68.1582925930347; Fri, 28 Feb 2020 13:38:50 -0800 (PST) Received: from nimloth.alvh.no-ip.org ([199.116.115.139]) by smtp.gmail.com with ESMTPSA id g190sm4409142ywf.41.2020.02.28.13.38.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 13:38:47 -0800 (PST) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 6722C300681; Fri, 28 Feb 2020 12:03:23 -0300 (-03) Date: Fri, 28 Feb 2020 12:03:23 -0300 From: Alvaro Herrera To: Peter Eisentraut Cc: pgsql-hackers Subject: Re: HAVE_WORKING_LINK still needed? Message-ID: <20200228150323.GA30707@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <72fff73f-dc9c-4ef4-83e8-d2e60c98df48@2ndquadrant.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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