Bug 150979 - postgresql does not initialize db properly
Summary: postgresql does not initialize db properly
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: selinux-policy-targeted   
(Show other bugs)
Version: 4.0
Hardware: i386
OS: Linux
Target Milestone: ---
: ---
Assignee: Daniel Walsh
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-03-13 10:39 UTC by Stanislav Polasek
Modified: 2007-11-30 22:07 UTC (History)
3 users (show)

Fixed In Version: 1.25.4-10.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-15 15:58:51 UTC
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 10:41 UTC, Stanislav Polasek
no flags Details
erros when /tmp is mounted on tmpfs (1.21 KB, text/plain)
2005-03-14 01:02 UTC, Aleksandar Milivojevic
no flags Details

Description Stanislav Polasek 2005-03-13 10:39:49 UTC
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 10:41:11 UTC
Created attachment 111935 [details]
Dmesg output after database initialization

Comment 2 Stanislav Polasek 2005-03-13 10:45:46 UTC
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 11:44:50 UTC
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 20:41:29 UTC
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-14 01:02:31 UTC
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 21:41:46 UTC
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-04 01:53:22 UTC
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 13:30:14 UTC
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.