Re: [HACKERS] mklink of pg_standby

2008-01-21 Thread Magnus Hagander
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

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [HACKERS] mklink of pg_standby

2008-01-21 Thread Magnus Hagander
On Mon, Jan 21, 2008 at 07:33:57AM +, Simon Riggs wrote:
 On Mon, 2008-01-21 at 15:36 +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.
 
 Hi Hiroshi,
 
 pg_standby uses mklink which defaults to creating symbolic links on
 Win2003 and Win2008:
 
 http://technet2.microsoft.com/windowsserver2008/en/library/0ce4df22-2dbc-48fc-9c16-b721ae85f8571033.mspx?mfr=true
 
 I think you're referring to the point that mklink is not available for
 XP and 2k.

I assume you actually maen Vista + 2008? Symlinks aren't supported on
Win2k3 AFAIK, and that page certainly says nothing about them. Plus, none
of my 2k3 machines appear to have mklink.exe :-P

//Magnus

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [HACKERS] mklink of pg_standby

2008-01-21 Thread Hiroshi Saito

Hi.

- Original Message - 
From: Magnus Hagander [EMAIL PROTECTED]




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.


Yeah, vote +1:-)
Probably, the equipment which is not Symbolic Link is needed in order 
to correspond to XP and 2K. It is hard to use rather than 'SymbolicLink'.

It will be enough if notice are written to a document.

Regards,
Hiroshi Saito


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [HACKERS] mklink of pg_standby

2008-01-21 Thread Magnus Hagander
On Mon, Jan 21, 2008 at 10:11:52PM +0900, Hiroshi Saito wrote:
 Hi.
 
 - Original Message - 
 From: Magnus Hagander [EMAIL PROTECTED]
 
 
 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.
 
 Yeah, vote +1:-)
 Probably, the equipment which is not Symbolic Link is needed in order 
 to correspond to XP and 2K. It is hard to use rather than 'SymbolicLink'.
 It will be enough if notice are written to a document.

The notice is *alraedy* in the documentation. 
http://www.postgresql.org/docs/8.3/static/pgstandby.html
has:
-l will not work on versions of Windows prior to Vista.

//Magnus

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [HACKERS] mklink of pg_standby

2008-01-21 Thread Hiroshi Saito

Hi.

From: Magnus Hagander [EMAIL PROTECTED]


Yeah, vote +1:-)
Probably, the equipment which is not Symbolic Link is needed in order 
to correspond to XP and 2K. It is hard to use rather than 'SymbolicLink'.

It will be enough if notice are written to a document.


The notice is *alraedy* in the documentation. 
http://www.postgresql.org/docs/8.3/static/pgstandby.html

has:
-l will not work on versions of Windows prior to Vista.


Ugaa, sorry this noise. , I had overlooked it. 


---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[HACKERS] mklink of pg_standby

2008-01-20 Thread Hiroshi Saito

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.:-)

Regards,
Hiroshi Saito


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [HACKERS] mklink of pg_standby

2008-01-20 Thread Simon Riggs
On Mon, 2008-01-21 at 15:36 +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.

Hi Hiroshi,

pg_standby uses mklink which defaults to creating symbolic links on
Win2003 and Win2008:

http://technet2.microsoft.com/windowsserver2008/en/library/0ce4df22-2dbc-48fc-9c16-b721ae85f8571033.mspx?mfr=true

I think you're referring to the point that mklink is not available for
XP and 2k.

The API call you give is limited to Windows Vista and later, so doesn't
really help us get any closer.

If anybody has a suggestion, I'd be happy to implement, though I don't
have a test rig for Windows.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq