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

Re: BUG #4092: initdb fails if the xlog directory is the same as [pg_data]/pg_xlog

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Peter Koczan" <pjkoczan(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4092: initdb fails if the xlog directory is the same as [pg_data]/pg_xlog
Date: 2008-04-05 15:26:46
Message-ID: 14115.1207409206@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Peter Koczan" <pjkoczan(at)gmail(dot)com> writes:
> Submitted for your approval is a patch to src/bin/initdb/initdb.c that
> corrects this by looking at the errno generated from the symlink call. If
> it's EEXIST, that means that it tried to symlink pg_xlog to itself

That conclusion seems both a leap of logic, and unportable.  You might
get some other errno depending on the platform and filesystem.

> failed) and the existing pg_xlog directory remains. Basically, initdb runs
> as if it ignored -X and politely informs the user that the symlink failed.

I don't really concur that ignoring a bogus switch specification is
a good idea.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Pavel ZaitsevDate: 2008-04-06 11:04:46
Subject: BUG #4095: Out of memory when restore db
Previous:From: Premek PaskaDate: 2008-04-05 15:05:42
Subject: Re: BUG #4084: Some DST timezones switche to summer time (one week) later

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