Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Tablespaces

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org,PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [HACKERS] Tablespaces
Date: 2004-03-03 04:33:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-hackers-win32
Greg Stark wrote:
> > > I am expecting to hear some bleating about this from people whose
> > > preferred platforms don't support symlinks ;-).  However, if we don't
> Well, one option would be to have the low level filesystem storage (md.c?)
> routines implement a kind of symlink themselves. Just a file with a special
> magic number followed by a path.
> I'm normally against reimplementing OS services but symlinks are really a very
> simple concept and simple to implement. Especially if you can make a few
> simplifying assumptions: they only ever need to appear as the final path
> element not as parent directories and tablespaces don't need symlinks pointing
> to symlinks. Ideally postgres also doesn't need to implement relative links
> either.

I just checked from the MinGW console and I see:
	# touch a
	# ln -s a b
	# echo test >a
	# cat b
	# l ?
	-rw-r--r--    1 Bruce Mo Administ        5 Mar  2 23:30 a
	-rw-r--r--    1 Bruce Mo Administ        0 Mar  2 23:30 b
	# cat a
	# cat b

It accepts ln -s, but does nothing with it.

For tablespaces on OS's that don't support it, I think we will have to
store the path name in the file and read it via the backend.  Somehow we
should cache those lookups.

  Bruce Momjian                        |
  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


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2004-03-03 04:34:55
Subject: Re: Tablespaces
Previous:From: Joe ConwayDate: 2004-03-03 04:31:59
Subject: Re: Out of space situation and WAL log pre-allocation (was

pgsql-hackers-win32 by date

Next:From: Bruce MomjianDate: 2004-03-03 04:34:55
Subject: Re: Tablespaces
Previous:From: Bruce MomjianDate: 2004-03-03 04:27:46
Subject: Re: Tablespaces

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group