dbTalk Databases Forums  

[BUGS] possible bug...

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] possible bug... in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
SriKumar Kareti
 
Posts: n/a

Default [BUGS] possible bug... - 09-22-2005 , 09:28 AM






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

Reply With Quote
  #2  
Old   
Alvaro Herrera
 
Posts: n/a

Default Re: [BUGS] possible bug... - 09-22-2005 , 09:42 AM






On Wed, Sep 21, 2005 at 01:49:35PM -0500, SriKumar Kareti wrote:

Hi,

Quote:
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)

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
  #3  
Old   
Prasad Duggineni
 
Posts: n/a

Default Re: [BUGS] possible bug... - 09-22-2005 , 09:43 AM



Try turning the enforcement mode off.

----- Original Message -----
From: "SriKumar Kareti" <SriKumar.Kareti (AT) spanlink (DOT) com>
To: <pgsql-bugs (AT) postgresql (DOT) org>
Sent: Wednesday, September 21, 2005 2:49 PM
Subject: [BUGS] possible bug...


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



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
  #4  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] possible bug... - 09-22-2005 , 10:30 AM



"Prasad Duggineni" <pduggineni (AT) prominencenet (DOT) com> writes:
Quote:
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

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings


Reply With Quote
  #5  
Old   
SriKumar Kareti
 
Posts: n/a

Default Re: [BUGS] possible bug... - 09-22-2005 , 11:36 PM



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:
Quote:
"Prasad Duggineni" <pduggineni (AT) prominencenet (DOT) 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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.