Re: cygwin rename instead of link (7.2.2)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk>
Cc: "'pgsql-patches(at)postgresql(dot)org'" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: cygwin rename instead of link (7.2.2)
Date: 2002-08-27 14:23:02
Message-ID: 200208271423.g7REN2x21211@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


The fix will appear in 7.3:

#if !defined(__BEOS__) && !defined(N_PLAT_NLM) && !defined(__CYGWIN__)
if (link(tmppath, path) < 0)
elog(PANIC, "link from %s to %s (initialization of log file %u, segment %u) failed: %m",
tmppath, path, log, seg);
unlink(tmppath);

We could have back-patched this into 7.2.2, but one thought of it. Sorry.

---------------------------------------------------------------------------

Henshall, Stuart - WCP wrote:
> In the recently released 7.2.2 there is still the problem that this patch
> solved:
> http://archives.postgresql.org/pgsql-cygwin/2002-05/msg00053.php
> Here is a patch against 7.2.2 to resolve it:
> *** src/backend/access/transam/xlog.c.orig Fri Mar 15 19:20:42 2002
> --- src/backend/access/transam/xlog.c Mon Jun 09 13:05:26 2002
> ***************
> ** 1506,1512 ****
> * overwrite an existing logfile. However, there shouldn't be one,
> so
> * rename() is an acceptable substitute except for the truly
> paranoid.
> */
> ! #ifndef __BEOS__
> if (link(tmppath, path) < 0)
> elog(STOP, "link from %s to %s (initialization of log file
> %u, segment %u) failed: %m",
> tmppath, path, log, seg);
> --- 1506,1512 ----
> * overwrite an existing logfile. However, there shouldn't be one,
> so
> * rename() is an acceptable substitute except for the truly
> paranoid.
> */
> ! #if !defined(__BEOS__) && !defined(__CYGWIN__)
> if (link(tmppath, path) < 0)
> elog(STOP, "link from %s to %s (initialization of log file
> %u, segment %u) failed: %m",
> tmppath, path, log, seg);

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2002-08-27 14:37:43 Re: minor auth code cleanup
Previous Message Gavin Sherry 2002-08-27 14:08:53 Re: [HACKERS] CREATE TEMP TABLE .... ON COMMIT