Bug 150979 - postgresql does not initialize db properly
postgresql does not initialize db properly
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: selinux-policy-targeted (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Depends On:
  Show dependency treegraph
Reported: 2005-03-13 05:39 EST by Stanislav Polasek
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version: 1.25.4-10.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-15 11:58:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Dmesg output after database initialization (859 bytes, text/plain)
2005-03-13 05:41 EST, Stanislav Polasek
no flags Details
erros when /tmp is mounted on tmpfs (1.21 KB, text/plain)
2005-03-13 20:02 EST, Aleksandar Milivojevic
no flags Details

  None (edit)
Description Stanislav Polasek 2005-03-13 05:39:49 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6)
Gecko/20050302 Firefox/1.0.1 Fedora/1.0.1-1.3.2

Description of problem:
There is a problem after postgresql server db initialization:
-bash-3.00$ psql -l
ERROR:  relation "pg_catalog.pg_user" does not exist

Looks much like the fedora core 3 bug

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. rm -rf /var/lib/pgsql/data
2. service postgresql start
3. psql -l

Actual Results:  ERROR:  relation "pg_catalog.pg_user" does not exist

Expected Results:  List of available databases

Additional info:
Comment 1 Stanislav Polasek 2005-03-13 05:41:11 EST
Created attachment 111935 [details]
Dmesg output after database initialization
Comment 2 Stanislav Polasek 2005-03-13 05:45:46 EST
It is clean installation of RHEL 4, all available updates added and
(after I recognized the problem) relabeled on reboot.
Comment 3 Stanislav Polasek 2005-03-13 06:44:50 EST
I copied the postgresql.te policy source file from current FC3, recreated policy
by runing make, run relabel on reboot. However, the problem persists.
Comment 4 Stanislav Polasek 2005-03-13 15:41:29 EST
I found this: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=149237
It is exactly the same bug. Setenforce 0; postgresql start; setenforce
1 works as the workaround.
Comment 5 Aleksandar Milivojevic 2005-03-13 20:02:31 EST
Created attachment 111959 [details]
erros when /tmp is mounted on tmpfs

If /tmp is mounted on tmpfs, there are more problems with targeted policy and
postgresql.  The attached errors were generated when I did:

# setenforce 0
# /etc/init.d/postgresql start
# setenforce 1

/tmp entry from /etc/fstab looks like this:
none /tmp tmpfs defaults 0 0
Comment 6 Daniel Walsh 2005-03-14 16:41:46 EST
The policy in U1 should fix this problem.

A prerelease is available in 


You need to update policycoreutils and selinux-policy-targeted.\
Comment 7 Gavin Carr 2005-04-03 21:53:22 EDT
I'm hitting this bug as well. Daniel, could you post the SRPM to your prerelease
policycoreutils for those of us on non-i386 arches?
Comment 8 Daniel Walsh 2005-04-04 09:30:14 EDT
I have posted all arch's and the SRPM.

Note You need to log in before you can comment on or make changes to this bug.