[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

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

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 amitabhk...@gmail.com wrote: David

Re: [GENERAL] initdb error

2012-12-15 Thread Tom Lane
David Noel david.i.n...@gmail.com 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

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 we

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-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 running

Re: [GENERAL] initdb error

2012-12-14 Thread Amitabh Kant
On Fri, Dec 14, 2012 at 4:28 PM, David Noel david.i.n...@gmail.com 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

Re: [GENERAL] initdb error

2012-12-14 Thread David Noel
On 12/13/12, David Noel david.i.n...@gmail.com 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

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
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 hardware.

Re: [GENERAL] initdb error

2012-12-14 Thread Tom Lane
David Noel david.i.n...@gmail.com 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

Re: [GENERAL] initdb error

2012-12-14 Thread David Noel
On 12/14/12, Tom Lane t...@sss.pgh.pa.us wrote: David Noel david.i.n...@gmail.com 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

Re: [GENERAL] initdb error

2012-12-14 Thread Tom Lane
David Noel david.i.n...@gmail.com writes: On 12/14/12, Tom Lane t...@sss.pgh.pa.us 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

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

[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 be

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

Re: [GENERAL] initdb error

2012-12-13 Thread David Noel
On 12/13/12, Adrian Klaver adrian.kla...@gmail.com 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

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 adrian.kla...@gmail.com 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

Re: [GENERAL] initdb error

2012-12-13 Thread Tom Lane
David Noel david.i.n...@gmail.com 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

Re: [GENERAL] initdb error

2012-12-13 Thread Amitabh Kant
On Thu, Dec 13, 2012 at 10:00 PM, Adrian Klaver adrian.kla...@gmail.comwrote: On 12/13/2012 08:18 AM, David Noel wrote: On 12/13/12, Adrian Klaver adrian.kla...@gmail.com wrote: On 12/13/2012 07:38 AM, David Noel wrote: I'm running into the following error message when running initdb

Re: [GENERAL] initdb error

2012-12-13 Thread Adrian Klaver
On 12/13/2012 08:35 AM, Tom Lane wrote: David Noel david.i.n...@gmail.com 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

Re: [GENERAL] initdb error

2012-12-13 Thread Amitabh Kant
On Thu, Dec 13, 2012 at 10:05 PM, Tom Lane t...@sss.pgh.pa.us wrote: David Noel david.i.n...@gmail.com 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

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 David Noel
On 12/13/12, Tom Lane t...@sss.pgh.pa.us wrote: David Noel david.i.n...@gmail.com 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

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

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 t...@sss.pgh.pa.us 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

Re: [GENERAL] initdb error

2012-12-13 Thread David Noel
On 12/13/12, Adrian Klaver adrian.kla...@gmail.com wrote: On 12/13/2012 10:47 AM, David Noel wrote: On 12/13/12, Tom Lane t...@sss.pgh.pa.us 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,

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 david.i.n...@gmail.com wrote: On 12/13/12, Adrian Klaver adrian.kla...@gmail.com wrote: On 12/13/2012 10:47 AM, David Noel wrote: On 12/13/12, Tom Lane t...@sss.pgh.pa.us wrote: ygg:/usr/home/ygg ll

Re: [GENERAL] initdb error

2012-12-13 Thread Tom Lane
David Noel david.i.n...@gmail.com writes: On 12/13/12, Tom Lane t...@sss.pgh.pa.us 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,

Re: [GENERAL] initdb error

2012-12-13 Thread Tom Lane
David Noel david.i.n...@gmail.com 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? (Im wondering if zfs has issues with the O_DIRECT flag that we'll probably try to use with pg_xlog files.)

Re: [GENERAL] initdb error

2012-12-13 Thread David Noel
On 12/13/12, Tom Lane t...@sss.pgh.pa.us wrote: David Noel david.i.n...@gmail.com 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? (Im wondering if zfs has issues with the O_DIRECT flag that we'll probably try to

Re: [GENERAL] initdb error

2012-12-13 Thread Tom Lane
David Noel david.i.n...@gmail.com writes: On 12/13/12, Tom Lane t...@sss.pgh.pa.us wrote: (Im 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

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 t...@sss.pgh.pa.us wrote: David Noel david.i.n...@gmail.com 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? (Im wondering if zfs has issues with the

Re: [GENERAL] initdb error

2012-12-13 Thread Amitabh Kant
On Fri, Dec 14, 2012 at 3:10 AM, David Noel david.i.n...@gmail.com wrote: On 12/13/12, Tom Lane t...@sss.pgh.pa.us wrote: David Noel david.i.n...@gmail.com 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?

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: [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: [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

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

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 directory

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

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 be

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,

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

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

[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: http://groups.google.com/groups?hl=enlr=threadm=60b4un%24cqh%241%40dolphin.neosoft.comrnum=2prev=/groups%3Fq%3Dgetcwd%2520permissions%2520symlink%26hl%3Den%26lr%3D%26sa%3DN%26tab%3Dwg and noting there

[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 

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'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 through

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 through