Date: Sat, 15 Dec 2012 09:02:34 -0600 From: David Noel <david.i.noel@gmail.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: postgres, initdb, FreeBSD bug? Message-ID: <CAHAXwYCZUgk=VCgjE1Lccmi26BQGP5PfMOjfhYi5Weo=e9FMRQ@mail.gmail.com> In-Reply-To: <20121215095324.GU71906@kib.kiev.ua> References: <CAHAXwYA6o_hBpAvm=H4bpXNOKr7ec10zH30G3KWQXg7JEj0mDQ@mail.gmail.com> <20121215095324.GU71906@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
Ahh... the security.bsd. sysctl output had the answer: I had security.bsd.hardlink_check_gid and security.bsd.hardlink_check_uid set to 1 in sysctl.conf. Removing that fixed the problem. Many thanks, -David > Show the ktrace from the same error on UFS. 5179 postgres CALL unlink(0x7fffffffe570) 5179 postgres NAMI "pg_notify/0000" 5179 postgres RET unlink 0 5179 postgres CALL getdirentries(0x3,0x801a4b000,0x1000,0x801a4a068) 5179 postgres RET getdirentries 0 5179 postgres CALL lseek(0x3,0,SEEK_SET) 5179 postgres RET lseek 0 5179 postgres CALL close(0x3) 5179 postgres RET close 0 5179 postgres CALL open(0x7fffffffe580,O_RDWR|O_CREAT,S_IRUSR|S_IWUSR) 5179 postgres NAMI "pg_notify/0000" 5179 postgres RET open 3 5179 postgres CALL lseek(0x3,0,SEEK_SET) 5179 postgres RET lseek 0 5179 postgres CALL write(0x3,0x8041c1b40,0x2000) 5179 postgres GIO fd 3 wrote 4096 bytes ... 5179 postgres RET write 8192/0x2000 5179 postgres CALL close(0x3) 5179 postgres RET close 0 5179 postgres CALL unlink(0x7fffffffbc60) 5179 postgres NAMI "pg_xlog/000000010000000000000001" 5179 postgres RET unlink -1 errno 2 No such file or directory 5179 postgres CALL link(0x7fffffffc130,0x7fffffffbc60) 5179 postgres NAMI "pg_xlog/xlogtemp.5179" 5179 postgres NAMI "pg_xlog/000000010000000000000001" 5179 postgres RET link -1 errno 1 Operation not permitted 5179 postgres CALL unlink(0x7fffffffc130) 5179 postgres NAMI "pg_xlog/xlogtemp.5179" 5179 postgres RET unlink 0 5179 postgres CALL open(0x7fffffffc530,O_RDWR,<unused>0x180) 5179 postgres NAMI "pg_xlog/000000010000000000000001" 5179 postgres RET open -1 errno 2 No such file or directory > Show the security.bsd sysctl settings, in particular, > harlink_check_{u,g}id.ygg# sysctl security.bsd. security.bsd.map_at_zero: 0 security.bsd.suser_enabled: 1 security.bsd.unprivileged_proc_debug: 0 security.bsd.conservative_signals: 1 security.bsd.see_other_gids: 0 security.bsd.see_other_uids: 0 security.bsd.unprivileged_idprio: 0 security.bsd.unprivileged_read_msgbuf: 0 security.bsd.hardlink_check_gid: 1 security.bsd.hardlink_check_uid: 1 security.bsd.unprivileged_get_quota: 0 security.bsd.stack_guard_page: 0 > Show the ls -la output for the pg_xlog directory. ygg:~> ls -la /zdb/pgsql/data/pg_xlog/ total 5 drwx------ 3 pgsql wheel 3 Dec 15 08:39 . drwx------ 14 pgsql wheel 18 Dec 15 08:39 .. drwx------ 2 pgsql wheel 2 Dec 15 08:39 archive_status
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHAXwYCZUgk=VCgjE1Lccmi26BQGP5PfMOjfhYi5Weo=e9FMRQ>