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

Re: BUG #5674: initdb failed if path contains symlink

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5674: initdb failed if path contains symlink
Date: 2010-09-27 14:14:00
Message-ID: 13399.1285596840@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Magnus Hagander <magnus(at)hagander(dot)net> writes:
> On Mon, Sep 27, 2010 at 12:05, Itagaki Takahiro
> <itagaki(dot)takahiro(at)gmail(dot)com> wrote:
>> The bug might come from the following bug by Microsoft:
>> http://connect.microsoft.com/VisualStudio/feedback/details/595553/stat-function-returns-error-for-directory-symbolic-links
>> 
>> Note that initdb in 8.4 worked expectedly because it is built with MSVC 2005,
>> but initdb in 9.0 won't work because built with MSVC 2008 :-( .

> Ouch.

> We could work around it in this place (we could specifically ignore
> the "file exists" error on the mkdir call), I guess. But how likely is
> that to bite us elsewhere then?

That cure seems worse than the disease.  We don't have to support
symlinks in the datadir path; we do have to be sure that we're not
overwriting an existing DB.

I think this is a Microsoft bug and it's their problem to fix, not ours.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2010-09-27 14:32:37
Subject: Re: [BUGS] Mapping Hibernate boolean to smallint(Postgresql)
Previous:From: Dave PageDate: 2010-09-27 12:34:40
Subject: Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session

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