Re: mklink of pg_standby

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Dave Page <dpage(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: mklink of pg_standby
Date: 2008-01-21 13:00:02
Message-ID: 20080121130002.GI10643@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 21, 2008 at 03:36:29PM +0900, Hiroshi Saito wrote:
> Hi Simon, and Dave,Magnus.
>
> About pg_standby, a link option cause a problem in windows(XP and 2k,2k3).
> It is because the call of mklink is needed. Then, they are the new programs
> of VISTA and 2008. It is CreateSymbolicLink of API of kernel32.lib is
> equipped with mklink.
> http://msdn2.microsoft.com/en-us/library/aa363866.aspx
>
> Therefore, I considered whether it should correspond by the 'Junction' or
> the 'Hard Link' this way and that. However, The addition thought that it
> was not desirable by the reason of the process of evolution functional
> pg_standby. A copy function is no problem. However, I think that it is
> necessary to write it to a document in order to avoid a user's confusion.
> probably, has that no source code corrects.
>
> to Dave,and Magnus.
> You can do more honest suggestion.:-)

Junctions only work for directories, not for files.

In theory, you should be able to use mklink to create a hardlink on
previous versions of Windows, but I'm not sure if it'll work. But we want
symlinks here, not hardlinks, and they are simply not supported on earlier
versions of Windows.

It is alerady documented that it doesn't work on Windows prior to Vista. I
think this is fine. What we could add is a specific version check to
pg_standby to have it emit a "not supported on this windows version" error
if it's not supported. But I think that's overkill - it will still fail,
and it's well documented that it's not *supposed* to work.

//Magnus

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-01-21 13:01:08 Re: mklink of pg_standby
Previous Message ohp 2008-01-21 11:12:11 Re: sun to buy mysql