Thread: Re: win32 tablespace handing

Re: win32 tablespace handing

From
"Magnus Hagander"
Date:
>> Cygwin can do symlinks for directories via the magic .lnk file.
>> But Cygwin can also do junctions via hardlinks in ln.exe.
>> I thought link() calls the junction code.
>> I'll investigate why the libc link() failed, and if ln.exe does some
>> sifferent magic, similar to pgsymlink.
>
>I thought a little bit over this.
>
>hardlinks and junctions don't work across physical disks, only
>symlinks.

Pardon me for saying "Huh"? Junctions work just fine across disks. I
just created a tablespace here, and got the following from the
sysinternals too:
D:\pgdata\pg_tblspc>junction 164705

Junction v1.03 - Win2K junction creator and reparse point viewer
Copyright (C) 2000-2002 Mark Russinovich
Systems Internals - http://www.sysinternals.com

D:\pgdata\pg_tblspc\164705: JUNCTION
   Substitute Name: c:\temp\pgtest


And yes, tables created there go on C:. Tables in the default tablespace
go on D:.


(IIRC, junctions are even used for the Remote Storage facility, so the
disk theoreticallky doesn't even have to be in your machine at the time)


I don't think hardlinks work across disks, though, but I don't think we
use them.


//Magnus

Re: win32 tablespace handing

From
"Zeugswetter Andreas SB SD"
Date:
> > hardlinks and junctions don't work across physical disks, only symlinks.
>
> Where did you read this?  I just looked and can see no such restriction.

There is no such restriction for junctions, I just tried it to be safe.

Andreas

Re: [pgsql-hackers-win32] win32 tablespace handing

From
Reini Urban
Date:
Zeugswetter Andreas SB SD schrieb:
>>>hardlinks and junctions don't work across physical disks, only symlinks.
>>Where did you read this?  I just looked and can see no such restriction.
>
> There is no such restriction for junctions, I just tried it to be safe.

Yes, sorry. I had old NTFS4 information.
NTFS5 supports volume mount points now too.

But shouldn't we check in configure :) for this filesystem then?
(Ha! ntfs5.m4 for MSVC folks)
--
Reini Urban


Re: [pgsql-hackers-win32] win32 tablespace handing

From
"Andrew Dunstan"
Date:
Reini Urban said:
> Zeugswetter Andreas SB SD schrieb:
>>>>hardlinks and junctions don't work across physical disks, only
>>>>symlinks.
>>>Where did you read this?  I just looked and can see no such
>>>restriction.
>>
>> There is no such restriction for junctions, I just tried it to be
>> safe.
>
> Yes, sorry. I had old NTFS4 information.
> NTFS5 supports volume mount points now too.
>
> But shouldn't we check in configure :) for this filesystem then?
> (Ha! ntfs5.m4 for MSVC folks)

No, of course not. That would only check the machine where you compile, not
where you install/run.

cheers

andrew



Re: [pgsql-hackers-win32] win32 tablespace handing

From
Bruce Momjian
Date:
Andrew Dunstan wrote:
> Reini Urban said:
> > Zeugswetter Andreas SB SD schrieb:
> >>>>hardlinks and junctions don't work across physical disks, only
> >>>>symlinks.
> >>>Where did you read this?  I just looked and can see no such
> >>>restriction.
> >>
> >> There is no such restriction for junctions, I just tried it to be
> >> safe.
> >
> > Yes, sorry. I had old NTFS4 information.
> > NTFS5 supports volume mount points now too.
> >
> > But shouldn't we check in configure :) for this filesystem then?
> > (Ha! ntfs5.m4 for MSVC folks)
>
> No, of course not. That would only check the machine where you compile, not
> where you install/run.

Tablespaces are not supported on NT4. They throw an error.

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

Re: [pgsql-hackers-win32] win32 tablespace handing

From
Reini Urban
Date:
Bruce Momjian schrieb:
> Andrew Dunstan wrote:
>>Reini Urban said:
>>>Zeugswetter Andreas SB SD schrieb:
>>>>>>hardlinks and junctions don't work across physical disks, only
>>>>>>symlinks.
>>>>>
>>>>>Where did you read this?  I just looked and can see no such
>>>>>restriction.
>>>>
>>>>There is no such restriction for junctions, I just tried it to be
>>>>safe.
>>>
>>>Yes, sorry. I had old NTFS4 information.
>>>NTFS5 supports volume mount points now too.
>>>
>>>But shouldn't we check in configure :) for this filesystem then?
>>>(Ha! ntfs5.m4 for MSVC folks)
>>
>>No, of course not. That would only check the machine where you compile, not
>>where you install/run.
>
> Tablespaces are not supported on NT4. They throw an error.

So just describe in the docs that only NTFS5 (i.e. W2K and up) supports
th new tablespace feature.
I could find my cygwin niche then to support it by our native and slow
symlink implementation :)
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

Re: [pgsql-hackers-win32] win32 tablespace handing

From
Bruce Momjian
Date:
Reini Urban wrote:
> Bruce Momjian schrieb:
> > Andrew Dunstan wrote:
> >>Reini Urban said:
> >>>Zeugswetter Andreas SB SD schrieb:
> >>>>>>hardlinks and junctions don't work across physical disks, only
> >>>>>>symlinks.
> >>>>>
> >>>>>Where did you read this?  I just looked and can see no such
> >>>>>restriction.
> >>>>
> >>>>There is no such restriction for junctions, I just tried it to be
> >>>>safe.
> >>>
> >>>Yes, sorry. I had old NTFS4 information.
> >>>NTFS5 supports volume mount points now too.
> >>>
> >>>But shouldn't we check in configure :) for this filesystem then?
> >>>(Ha! ntfs5.m4 for MSVC folks)
> >>
> >>No, of course not. That would only check the machine where you compile, not
> >>where you install/run.
> >
> > Tablespaces are not supported on NT4. They throw an error.
>
> So just describe in the docs that only NTFS5 (i.e. W2K and up) supports
> th new tablespace feature.
> I could find my cygwin niche then to support it by our native and slow
> symlink implementation :)

I think we are fine.  We have already discussed not even supporting NT4
because tablespaces don't work, but now it will throw a not supported
error, which seems fine.

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