win32 tablespace handing - Mailing list pgsql-hackers

From Reini Urban
Subject win32 tablespace handing
Date
Msg-id 4162DDCE.2060400@x-ray.at
Whole thread Raw
In response to Re: open item: tablespace handing in pg_dump/pg_restore  (Reini Urban <rurban@x-ray.at>)
Responses Re: win32 tablespace handing
List pgsql-hackers
Reini Urban schrieb:
> 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.
The whole deal about tablespace locations is to seperate it onto another
disc, similar to the mysql innodb secondary storage. (or better db's)

For cygwin it is very easy to support symlinks to other discs.
Just use the native cygwin symlink(), not using the
pgport/dirmode:pgsymlink() hook. Just some #define rename hackery at the
beginning of the file.

For mingw and the other native WIN32 platforms, you can only support
junctions (limited functionality, but fast) or go through the trouble of
some symlink emulation. But different to the current pgsymlink code.
The only advantage is that this symlink resolver can be held in memory,
just needs some dump/restore functions to a .conf file.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

pgsql-hackers by date:

Previous
From: David Wheeler
Date:
Subject: Re: libpq and prepared statements progress for 8.0
Next
From: "Dann Corbit"
Date:
Subject: Re: libpq and prepared statements progress for 8.0