Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 5262

Summary: template database is not created when first install postgresql
Product: [Retired] Red Hat Raw Hide Reporter: carenas
Component: postgresqlAssignee: Trond Eivind Glomsrxd <teg>
Severity: high Docs Contact:
Priority: high    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-09-21 19:51:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description carenas 1999-09-21 00:13:05 UTC
template database should be created if there is no data.

%post server
if [ ! -d /var/lib/pgsql/data ];
  su -c "initdb --pglib=/usr/lib/pgsql
--pgdata=/var/lib/pgsql" postgres 2>&1

will be all what is needed for keeping the init error away

Comment 1 Jeff Johnson 1999-09-21 19:51:59 UTC
Fixed (by creating/converting database when starting postmaster) in
postgres-6.5.1-0.8 and later.