Thread: possible bug...
Hello! I am trying to install postgres 8.0.3 from rpms. [karetis@karetis ~]$ rpm -qa | grep postgres postgresql-8.0.3-1PGDG postgresql-server-8.0.3-1PGDG postgresql-libs-8.0.3-1PGDG [karetis@karetis ~]$ After I install the RPMs, when I try to initdb I run into problems. I did set the data directory to belong to "postgres" and I am trying to initdb as "postgres". I have read through several postings and have not seen anyone have the same problem. Thank you for your help. SriKumar. Here is the run: bash-3.00$ ls -l /usr/local/ total 88 drwxr-xr-x 2 root root 4096 Apr 28 00:09 bin drwxr-xr-x 2 root root 4096 Apr 28 00:09 etc drwxr-xr-x 2 root root 4096 Apr 28 00:09 games drwxr-xr-x 2 root root 4096 Apr 28 00:09 include drwxr-xr-x 2 root root 4096 Apr 28 00:09 lib drwxr-xr-x 2 root root 4096 Apr 28 00:09 libexec drwxr-xr-x 3 root root 4096 Sep 16 10:01 man drwxr-xr-x 3 postgres postgres 4096 Sep 20 09:21 pgsql drwxr-xr-x 2 root root 4096 Apr 28 00:09 sbin drwxr-xr-x 4 root root 4096 Sep 14 16:59 share drwxr-xr-x 2 root root 4096 Apr 28 00:09 src bash-3.00$ ls -l /usr/local/pgsql/ total 8 drwx------ 2 postgres postgres 4096 Sep 21 13:37 data bash-3.00$ whoami postgres bash-3.00$ initdb -D /usr/local/pgsql/data/ The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale en_US.UTF-8. The default database encoding has accordingly been set to UNICODE. initdb: directory "/usr/local/pgsql/data" exists but is not empty If you want to create a new database system, either remove or empty the directory "/usr/local/pgsql/data" or run initdb with an argument other than "/usr/local/pgsql/data". bash-3.00$ rm -R /usr/local/pgsql/data/* bash-3.00$ initdb -D /usr/local/pgsql/data/ The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale en_US.UTF-8. The default database encoding has accordingly been set to UNICODE. fixing permissions on existing directory /usr/local/pgsql/data ... ok creating directory /usr/local/pgsql/data/global ... ok creating directory /usr/local/pgsql/data/pg_xlog ... ok creating directory /usr/local/pgsql/data/pg_xlog/archive_status ... ok creating directory /usr/local/pgsql/data/pg_clog ... ok creating directory /usr/local/pgsql/data/pg_subtrans ... ok creating directory /usr/local/pgsql/data/base ... ok creating directory /usr/local/pgsql/data/base/1 ... ok creating directory /usr/local/pgsql/data/pg_tblspc ... ok selecting default max_connections ... 10 selecting default shared_buffers ... 50 creating configuration files ... ok creating template1 database in /usr/local/pgsql/data/base/1 ... child process exited with exit code 1 initdb: removing contents of data directory "/usr/local/pgsql/data" bash-3.00$
On Wed, Sep 21, 2005 at 01:49:35PM -0500, SriKumar Kareti wrote: Hi, > creating directory /usr/local/pgsql/data/base/1 ... ok > creating directory /usr/local/pgsql/data/pg_tblspc ... ok > selecting default max_connections ... 10 > selecting default shared_buffers ... 50 > creating configuration files ... ok > creating template1 database in /usr/local/pgsql/data/base/1 ... child > process exited with exit code 1 > initdb: removing contents of data directory "/usr/local/pgsql/data" Hmm, it seems like you are out of shared memory on this machine; maybe the kernel limits are too low. Try setting SHMMAX higher; you can do that using sysctl and/or /etc/sysctl.conf. Please see the documentation on "kernel limits". The error message is not really friendly though. -- Alvaro Herrera http://www.amazon.com/gp/registry/5ZYLFMCVHXC "We are who we choose to be", sang the goldfinch when the sun is high (Sandman)
Try turning the enforcement mode off. ----- Original Message ----- From: "SriKumar Kareti" <SriKumar.Kareti@spanlink.com> To: <pgsql-bugs@postgresql.org> Sent: Wednesday, September 21, 2005 2:49 PM Subject: [BUGS] possible bug... > Hello! > > I am trying to install postgres 8.0.3 from rpms. > > [karetis@karetis ~]$ rpm -qa | grep postgres > postgresql-8.0.3-1PGDG > postgresql-server-8.0.3-1PGDG > postgresql-libs-8.0.3-1PGDG > [karetis@karetis ~]$ > > > After I install the RPMs, when I try to initdb I run into problems. > I did set the data directory to belong to "postgres" and I am trying to > initdb as "postgres". I have read through several postings and have not > seen anyone have the same problem. > > Thank you for your help. > > SriKumar. > > Here is the run: > > bash-3.00$ ls -l /usr/local/ > total 88 > drwxr-xr-x 2 root root 4096 Apr 28 00:09 bin > drwxr-xr-x 2 root root 4096 Apr 28 00:09 etc > drwxr-xr-x 2 root root 4096 Apr 28 00:09 games > drwxr-xr-x 2 root root 4096 Apr 28 00:09 include > drwxr-xr-x 2 root root 4096 Apr 28 00:09 lib > drwxr-xr-x 2 root root 4096 Apr 28 00:09 libexec > drwxr-xr-x 3 root root 4096 Sep 16 10:01 man > drwxr-xr-x 3 postgres postgres 4096 Sep 20 09:21 pgsql > drwxr-xr-x 2 root root 4096 Apr 28 00:09 sbin > drwxr-xr-x 4 root root 4096 Sep 14 16:59 share > drwxr-xr-x 2 root root 4096 Apr 28 00:09 src > bash-3.00$ ls -l /usr/local/pgsql/ > total 8 > drwx------ 2 postgres postgres 4096 Sep 21 13:37 data > bash-3.00$ whoami > postgres > bash-3.00$ initdb -D /usr/local/pgsql/data/ > The files belonging to this database system will be owned by user > "postgres". > This user must also own the server process. > > The database cluster will be initialized with locale en_US.UTF-8. > The default database encoding has accordingly been set to UNICODE. > > initdb: directory "/usr/local/pgsql/data" exists but is not empty > If you want to create a new database system, either remove or empty > the directory "/usr/local/pgsql/data" or run initdb > with an argument other than "/usr/local/pgsql/data". > bash-3.00$ rm -R /usr/local/pgsql/data/* > bash-3.00$ initdb -D /usr/local/pgsql/data/ > The files belonging to this database system will be owned by user > "postgres". > This user must also own the server process. > > The database cluster will be initialized with locale en_US.UTF-8. > The default database encoding has accordingly been set to UNICODE. > > fixing permissions on existing directory /usr/local/pgsql/data ... ok > creating directory /usr/local/pgsql/data/global ... ok > creating directory /usr/local/pgsql/data/pg_xlog ... ok > creating directory /usr/local/pgsql/data/pg_xlog/archive_status ... ok > creating directory /usr/local/pgsql/data/pg_clog ... ok > creating directory /usr/local/pgsql/data/pg_subtrans ... ok > creating directory /usr/local/pgsql/data/base ... ok > creating directory /usr/local/pgsql/data/base/1 ... ok > creating directory /usr/local/pgsql/data/pg_tblspc ... ok > selecting default max_connections ... 10 > selecting default shared_buffers ... 50 > creating configuration files ... ok > creating template1 database in /usr/local/pgsql/data/base/1 ... child > process exited with exit code 1 > initdb: removing contents of data directory "/usr/local/pgsql/data" > bash-3.00$ > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > >
"Prasad Duggineni" <pduggineni@prominencenet.com> writes: > Try turning the enforcement mode off. Or put the data directory where the standard selinux policy expects it to be, namely /var/lib/pgsql/data. The lack of any useful error message is a selinux policy bug, which appears to be fixed in reasonably-current FC4 (I've got selinux-policy-targeted-1.25.4-10, and I don't see it). regards, tom lane
Thank you for your responses. I got impatient and tried installing 8.0.2 and had no problems whatsoever. I will follow up on your suggestions if I get to install 8.0.3. Thanks again. On Thu, 2005-09-22 at 11:23 -0400, Tom Lane wrote: > "Prasad Duggineni" <pduggineni@prominencenet.com> writes: > > Try turning the enforcement mode off. > > Or put the data directory where the standard selinux policy expects it > to be, namely /var/lib/pgsql/data. > > The lack of any useful error message is a selinux policy bug, which > appears to be fixed in reasonably-current FC4 (I've got > selinux-policy-targeted-1.25.4-10, and I don't see it). > > regards, tom lane