[GENERAL] initdb error

2012-12-16 Thread David Noel
I'm running into the following error message when running initdb (FreeBSD host): ygg# /usr/local/etc/rc.d/postgresql initdb -D /zdb/pgsql/data --debug The files belonging to this database system will be owned by user "pgsql". This user must also own the server process. The database cluster wi

Re: [GENERAL] initdb error

2012-12-15 Thread Tom Lane
I wrote: > Hah, I wondered if it might be something like that. Still, it's hard to > see how this link() would fail any security check that didn't amount to > disabling link() altogether. The UID and GID of the process, the old > file, and the directory will all match --- so exactly what rule are

Re: [GENERAL] initdb error

2012-12-15 Thread Tom Lane
David Noel writes: > Ugh. It turns out I had security.bsd.hardlink_check_gid=1 and > security.bsd.hardlink_check_uid=1 in sysctl.conf. Setting them to 0 > fixed everything. That's frustrating. Sorry for all the trouble. Many > thanks for helping resolve this. Hah, I wondered if it might be someth

Re: [GENERAL] initdb error

2012-12-15 Thread David Noel
Ugh. It turns out I had security.bsd.hardlink_check_gid=1 and security.bsd.hardlink_check_uid=1 in sysctl.conf. Setting them to 0 fixed everything. That's frustrating. Sorry for all the trouble. Many thanks for helping resolve this. On 12/15/12, Amitabh Kant wrote: > David > > I just tried instal

Re: [GENERAL] initdb error

2012-12-15 Thread Amitabh Kant
David I just tried installing PG 9.2.2 on FreeBSD 8.3 and initdb went smoothly without any problems. the only difference would be that I had it running in a virtualbox instance. My config were as follows; FreeBSD 8.3-RELEASE-p5 (binary updated through freebsd-update) PG 9.2.2 (installed through p

Re: [GENERAL] initdb error

2012-12-14 Thread David Noel
> You need to talk to some FreeBSD kernel hackers about why link() > might be failing here. Since you see it on UFS too, we can probably > exonerate the ZFS filesystem-specific code. > > I did some googling and found that EPERM can be issued if the filesystem > doesn't support hard links (which sh

Re: [GENERAL] initdb error

2012-12-14 Thread Tom Lane
David Noel writes: > On 12/14/12, Tom Lane wrote: >> This corresponds to the execution of XLogFileInit(), and what's >> evidently happening is that we successfully create and zero-fill >> the first xlog segment file under a temporary name, but then >> the attempt to rename it into place with link

Re: [GENERAL] initdb error

2012-12-14 Thread David Noel
On 12/14/12, Tom Lane wrote: > David Noel writes: >> I didn't have any luck with the rc script but I was able to use it to >> get a ktrace dump as root (ktrace as user pgsql doesn't seem to work). >> So hopefully that will show something(!) > > The relevant part of the ktrace output is > > 71502

Re: [GENERAL] initdb error

2012-12-14 Thread Tom Lane
David Noel writes: > I didn't have any luck with the rc script but I was able to use it to > get a ktrace dump as root (ktrace as user pgsql doesn't seem to work). > So hopefully that will show something(!) The relevant part of the ktrace output is 71502 postgres CALL unlink(0x7fffc130) 7

Re: [GENERAL] initdb error

2012-12-14 Thread David Noel
>> Interestingly, I have a second--virtually identical--server that I >> just tried initdb on. FreeBSD 8.3-RELEASE-p5, postgresql-server-9.2.2. >> Exact same "FATAL: could not open file pg_xlog" error. So it is >> reproducible. > > Does virtually identical extend to architecture, amd64? Yes... and

Re: [GENERAL] initdb error

2012-12-14 Thread Adrian Klaver
On 12/14/2012 04:08 AM, David Noel wrote: Interestingly, I have a second--virtually identical--server that I just tried initdb on. FreeBSD 8.3-RELEASE-p5, postgresql-server-9.2.2. Exact same "FATAL: could not open file pg_xlog" error. So it is reproducible. Does virtually identical extend to

Re: [GENERAL] initdb error

2012-12-14 Thread David Noel
On 12/13/12, David Noel wrote: > I'm running into the following error message when running initdb (FreeBSD > host): > > ygg# /usr/local/etc/rc.d/postgresql initdb -D /zdb/pgsql/data --debug > The files belonging to this database system will be owned by user "pgsql". > This user must also own th

Re: [GENERAL] initdb error

2012-12-14 Thread Amitabh Kant
On Fri, Dec 14, 2012 at 4:28 PM, David Noel wrote: > > Did you use ports to install postgresql? > > Yes > > > What is the version of postgresql and freebsd you are using? > > postgresql client and server v. 9.2.2. If all else fails I could try > downgrading to a previous version of postgres. > >

Re: [GENERAL] initdb error

2012-12-14 Thread David Noel
> Did you use ports to install postgresql? Yes > What is the version of postgresql and freebsd you are using? postgresql client and server v. 9.2.2. If all else fails I could try downgrading to a previous version of postgres. FreeBSD 8.3-RELEASE-p5 > I am getting a different output while runni

Re: [GENERAL] initdb error

2012-12-14 Thread David Noel
> Well this has definitely moved up a support level and past anything I > know about. > For the record what version of FreeBSD are you running in case someone > is searching the archives? Any help is always appreciated. FreeBSD 8.3-RELEASE-p5. (I wonder if upgrading to 9.1 would do anything..)

Re: [GENERAL] initdb error

2012-12-13 Thread Amitabh Kant
On Fri, Dec 14, 2012 at 3:10 AM, David Noel wrote: > On 12/13/12, Tom Lane wrote: > > David Noel writes: > >> /zdb is a zfs volume I've created for cvs and postgres. > > > > zfs eh? What happens if you point initdb at a non-zfs volume? > > > > (I"m wondering if zfs has issues with the O_DIRECT

Re: [GENERAL] initdb error

2012-12-13 Thread Adrian Klaver
On 12/13/2012 01:40 PM, David Noel wrote: On 12/13/12, Tom Lane wrote: David Noel writes: /zdb is a zfs volume I've created for cvs and postgres. zfs eh? What happens if you point initdb at a non-zfs volume? (I"m wondering if zfs has issues with the O_DIRECT flag that we'll probably try t

Re: [GENERAL] initdb error

2012-12-13 Thread Tom Lane
David Noel writes: > On 12/13/12, Tom Lane wrote: >> (I"m wondering if zfs has issues with the O_DIRECT flag that we'll >> probably try to use with pg_xlog files.) > I /boot off of a UFS volume so I created a directory there, chown and > chmod'ed it, then ran initdb again. Same error, unfortunat

Re: [GENERAL] initdb error

2012-12-13 Thread David Noel
On 12/13/12, Tom Lane wrote: > David Noel writes: >> /zdb is a zfs volume I've created for cvs and postgres. > > zfs eh? What happens if you point initdb at a non-zfs volume? > > (I"m wondering if zfs has issues with the O_DIRECT flag that we'll > probably try to use with pg_xlog files.) I /boo

Re: [GENERAL] initdb error

2012-12-13 Thread Tom Lane
David Noel writes: > /zdb is a zfs volume I've created for cvs and postgres. zfs eh? What happens if you point initdb at a non-zfs volume? (I"m wondering if zfs has issues with the O_DIRECT flag that we'll probably try to use with pg_xlog files.) regards, tom lane --

Re: [GENERAL] initdb error

2012-12-13 Thread Tom Lane
David Noel writes: > On 12/13/12, Tom Lane wrote: >> You could get more information by using the --noclean switch to prevent >> removal of the datadir after failure, and then having a look at the >> debris. Is there a pg_xlog subdirectory inside /zdb/pgsql/data, and if >> so what permissions has

Re: [GENERAL] initdb error

2012-12-13 Thread David Noel
Unfortunately no luck there. Still stick with the same error. On 12/13/12, David Noel wrote: > On 12/13/12, Adrian Klaver wrote: >> On 12/13/2012 10:47 AM, David Noel wrote: >>> On 12/13/12, Tom Lane wrote: >> >>> ygg:/usr/home/ygg> ll /zdb/pgsql/data/pg_xlog/ >>> total 2 >>> drwx-- 2 pgsq

Re: [GENERAL] initdb error

2012-12-13 Thread David Noel
On 12/13/12, Adrian Klaver wrote: > On 12/13/2012 10:47 AM, David Noel wrote: >> On 12/13/12, Tom Lane wrote: > >> ygg:/usr/home/ygg> ll /zdb/pgsql/data/pg_xlog/ >> total 2 >> drwx-- 2 pgsql wheel 2 Dec 13 12:42 archive_status >> > > Different train of thought, away from permissions. > > H

Re: [GENERAL] initdb error

2012-12-13 Thread Adrian Klaver
On 12/13/2012 10:47 AM, David Noel wrote: On 12/13/12, Tom Lane wrote: ygg:/usr/home/ygg> ll /zdb/pgsql/data/pg_xlog/ total 2 drwx-- 2 pgsql wheel 2 Dec 13 12:42 archive_status Different train of thought, away from permissions. How was Postgres installed? Where there any errors du

Re: [GENERAL] initdb error

2012-12-13 Thread Adrian Klaver
On 12/13/2012 10:42 AM, David Noel wrote: You are doing the above as the database user ex:postgres? confirmed: ygg:/usr/home/ygg> whoami pgsql The database user has permissions on /zdb/pgsql/data? confirmed: ygg:/usr/home/ygg> ll /zdb/ total 3 drwxrwxrwx 3 cvswheel 3 Dec 12 15:33 c

Re: [GENERAL] initdb error

2012-12-13 Thread David Noel
On 12/13/12, Tom Lane wrote: > David Noel writes: >> I've tried initdb directly: >> initdb -D /zdb/pgsql/data >> ...and still seem to wind up with the error: >> creating template1 database in /zdb/pgsql/data/base/1 ... FATAL: >> could not open file "pg_xlog/00010001" (log file 0,

Re: [GENERAL] initdb error

2012-12-13 Thread David Noel
> You are doing the above as the database user ex:postgres? confirmed: ygg:/usr/home/ygg> whoami pgsql > The database user has permissions on /zdb/pgsql/data? confirmed: ygg:/usr/home/ygg> ll /zdb/ total 3 drwxrwxrwx 3 cvswheel 3 Dec 12 15:33 cvsroot drwxrwxrwx 2 pgsql wheel 2 Dec 13

Re: [GENERAL] initdb error

2012-12-13 Thread Amitabh Kant
On Thu, Dec 13, 2012 at 10:05 PM, Tom Lane wrote: > David Noel writes: > > I've tried initdb directly: > > initdb -D /zdb/pgsql/data > > ...and still seem to wind up with the error: > > creating template1 database in /zdb/pgsql/data/base/1 ... FATAL: > > could not open file "pg_xlog/0001

Re: [GENERAL] initdb error

2012-12-13 Thread Adrian Klaver
On 12/13/2012 08:35 AM, Tom Lane wrote: David Noel writes: I've tried initdb directly: initdb -D /zdb/pgsql/data ...and still seem to wind up with the error: creating template1 database in /zdb/pgsql/data/base/1 ... FATAL: could not open file "pg_xlog/00010001" (log file 0, segm

Re: [GENERAL] initdb error

2012-12-13 Thread Amitabh Kant
On Thu, Dec 13, 2012 at 10:00 PM, Adrian Klaver wrote: > On 12/13/2012 08:18 AM, David Noel wrote: > >> On 12/13/12, Adrian Klaver wrote: >> >>> On 12/13/2012 07:38 AM, David Noel wrote: >>> I'm running into the following error message when running initdb (FreeBSD host):

Re: [GENERAL] initdb error

2012-12-13 Thread Tom Lane
David Noel writes: > I've tried initdb directly: > initdb -D /zdb/pgsql/data > ...and still seem to wind up with the error: > creating template1 database in /zdb/pgsql/data/base/1 ... FATAL: > could not open file "pg_xlog/00010001" (log file 0, > segment 1): No such file or directo

Re: [GENERAL] initdb error

2012-12-13 Thread Adrian Klaver
On 12/13/2012 08:18 AM, David Noel wrote: On 12/13/12, Adrian Klaver wrote: On 12/13/2012 07:38 AM, David Noel wrote: I'm running into the following error message when running initdb (FreeBSD host): ygg# /usr/local/etc/rc.d/postgresql initdb -D /zdb/pgsql/data --debug The files belonging to t

Re: [GENERAL] initdb error

2012-12-13 Thread David Noel
On 12/13/12, Adrian Klaver wrote: > On 12/13/2012 07:38 AM, David Noel wrote: >> I'm running into the following error message when running initdb (FreeBSD >> host): >> >> ygg# /usr/local/etc/rc.d/postgresql initdb -D /zdb/pgsql/data --debug >> The files belonging to this database system will be ow

Re: [GENERAL] initdb error

2012-12-13 Thread Adrian Klaver
On 12/13/2012 07:38 AM, David Noel wrote: I'm running into the following error message when running initdb (FreeBSD host): ygg# /usr/local/etc/rc.d/postgresql initdb -D /zdb/pgsql/data --debug The files belonging to this database system will be owned by user "pgsql". This user must also own the

[GENERAL] initdb error

2012-12-13 Thread David Noel
I'm running into the following error message when running initdb (FreeBSD host): ygg# /usr/local/etc/rc.d/postgresql initdb -D /zdb/pgsql/data --debug The files belonging to this database system will be owned by user "pgsql". This user must also own the server process. The database cluster will b

Re: [GENERAL] initdb error: "could not identify current directory"

2004-12-05 Thread OpenMacNews
hi joel, It looks to me like you are attempting to mount a few volumes under /var? actually, no. i'm symlinking local volumes mounted where they're supposed to be, in /Volumes, to ny /var/sub-hierarchy. I think that's going to wrinkle your handkerchief in Darwin. it's all been settled, actually (

Re: [GENERAL] initdb error: "could not identify current directory" (or,

2004-12-05 Thread Joel
> % cd /var/data/pgsql > still reports the absolute path > --> /Volumes/data/pgsql It looks to me like you are attempting to mount a few volumes under /var? I think that's going to wrinkle your handkerchief in Darwin. -- Joel Rees <[EMAIL PROTECTED]> digitcom, inc

Re: [SOLVED] Re: [GENERAL] initdb error: "could not identify current

2004-12-04 Thread OpenMacNews
tom, We're doing the best we can already: when the failure occurs, we really don't know which directory is the problem, and cannot find out because we can't navigate above it to find out its name. good point. catch-22. at the very least, some knowledgeable commentary in docs/FAQ/howto/Troubleshoo

Re: [SOLVED] Re: [GENERAL] initdb error: "could not identify current directory" (or, what have i done now?)

2004-12-04 Thread Tom Lane
OpenMacNews <[EMAIL PROTECTED]> writes: > whoa! i wasn't suggesting that at all ... rather, perhaps, simply a perms > check > from within the initdb script and an 'informative' error to the > end-user. We're doing the best we can already: when the failure occurs, we really don't know which direc

Re: [SOLVED] Re: [GENERAL] initdb error: "could not identify current

2004-12-04 Thread OpenMacNews
hi tom, % ls -ald /Volumes/data drwxr-x--x 12 openmac wheel 408 Nov 27 15:25 /Volumes/data/ Ah-hah, yes that's undoubtedly it. and, since i've cleared that up pgsql is, again, behaving. yay. for posterity's -- and other OSX users' -- sake, that's: for the relevant drives/mounts in /Volu

Re: [SOLVED] Re: [GENERAL] initdb error: "could not identify current directory" (or, what have i done now?)

2004-12-04 Thread Tom Lane
OpenMacNews <[EMAIL PROTECTED]> writes: > on my sys: >% ls -ald /Volumes/data > drwxr-x--x 12 openmac wheel 408 Nov 27 15:25 /Volumes/data/ Ah-hah, yes that's undoubtedly it. > if this *does* turn out to be the case, does it make sense to have the script > check perms up through the

[SOLVED] Re: [GENERAL] initdb error: "could not identify current directory" (or, what have i done now?)

2004-12-03 Thread OpenMacNews
hi tom, i think i got it ... keeping in mind your question re: read perms, & reading this thread: and noting

Re: [GENERAL] initdb error: "could not identify current directory" (or,

2004-12-03 Thread OpenMacNews
hi tom, per this thread, i've been googl'ing on 'getcwd initdb permissions parent' and find lots of refs ... issues with folks having 'permission denied' errors if parent directories don't have correct permissions, etc. this 'smells' pretty much like the issue at hand here ... tho' i dunno (yet)

Re: [GENERAL] initdb error: "could not identify current directory" (or,

2004-12-03 Thread OpenMacNews
hi tom, % ls -ald /Volumes/data/pgsql drwxrwxr-x 12 testuser testuser 408 Nov 25 09:12 /Volumes/data/pgsql Huh? Why didn't the rm -rf remove both of those? Or are you skipping some steps? oops, sorry, copy-n-paste-itis: % rm -rf /var/data/pgsql/* /Volumes/data/pgsql/* % cd /var/data/pg

Re: [GENERAL] initdb error: "could not identify current directory" (or, what have i done now?)

2004-12-03 Thread Tom Lane
OpenMacNews <[EMAIL PROTECTED]> writes: > then, i stumbled across the following behavior.: > % rm -rf /var/data/pgsql /Volumes/data/pgsql > % ls -ald /var/data/pgsql > lrwxr-xr-x 1 root wheel 27 Nov 22 20:26 /var/data/pgsql -> > /Volumes/data/pgsql > % ls -ald /Volumes/data/pgsql >

Re: [GENERAL] initdb error: "could not identify current directory" (or,

2004-12-03 Thread OpenMacNews
hi there, % /usr/local/pgsql/bin/initdb --pgdata=/var/data/pgsql --username=testuser could not identify current directory: Permission denied What directory are you in when you give this command? (AFAIR su doesn't change directory ... you might be better off with su - testuser ...) h, that'

Re: [GENERAL] initdb error: "could not identify current directory" (or, what have i done now?)

2004-12-03 Thread Tom Lane
OpenMacNews <[EMAIL PROTECTED]> writes: >> su testuser > % /usr/local/pgsql/bin/initdb --pgdata=/var/data/pgsql --username=testuser > could not identify current directory: Permission denied What directory are you in when you give this command? (AFAIR su doesn't change directory ... you might

[GENERAL] initdb error: "could not identify current directory" (or, what have i done now?)

2004-12-03 Thread OpenMacNews
hi all, i just clean-rebuilt pgsql8b5 os OSX 10.3.6 the build went fine as before -- no errors reported. per instruction, i've created an unpriv'd user: testuser. now, however, when i try to 'initdb', creating in '/var/data/pgsql': su testuser % /usr/local/pgsql/bin/initdb --pgdata=/var/data/pgsql

Re: [GENERAL] initdb error->ld-elf.so.1: Shared object "libpq.so.2" not found^H

1999-10-26 Thread Courtney Thomas
Jim Mercer wrote: > > > I got the above error [see subject] when I attempted to "initdb". > > > > What's wrong and how do I fix it ? > > what operating system? > > -- > [ Jim Mercer [EMAIL PROTECTED] +1 416 506-0654 ] > [ Reptilian Research -- Longer Life t

Re: [GENERAL] initdb error->ld-elf.so.1: Shared object "libpq.so.2" not found^H

1999-10-26 Thread Courtney Thomas
Jim Mercer wrote: > > > I got the above error [see subject] when I attempted to "initdb". > > > > What's wrong and how do I fix it ? > > what operating system? > > -- > [ Jim Mercer [EMAIL PROTECTED] +1 416 506-0654 ] > [ Reptilian Research -- Longer Life t

Re: [GENERAL] initdb error->ld-elf.so.1: Shared object "libpq.so.2" not found^H

1999-10-26 Thread Jim Mercer
> I got the above error [see subject] when I attempted to "initdb". > > What's wrong and how do I fix it ? what operating system? -- [ Jim Mercer [EMAIL PROTECTED] +1 416 506-0654 ] [ Reptilian Research -- Longer Life through Colder Blood ] [ Don

[GENERAL] initdb error->ld-elf.so.1: Shared object "libpq.so.2" not found

1999-10-26 Thread Courtney Thomas
Greetings ! I got the above error [see subject] when I attempted to "initdb". What's wrong and how do I fix it ? Appreciatively, Courtney