Bug 1265319

Summary: 'postgresql-setup --unit postgresql@second --upgrade' is broken in f23
Product: [Fedora] Fedora Reporter: Pavel Raiskup <praiskup>
Component: postgresqlAssignee: Pavel Raiskup <praiskup>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: devrim, hhorak, jmlich83, jstanek, praiskup, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: postgresql-9.4.4-4.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-04 19:15:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Raiskup 2015-09-22 16:24:20 UTC
With those options, setup script is unable to detect previous $PGDATA correctly.
This should be fixed by:
https://fedorapeople.org/cgit/praiskup/public_git/postgresql-setup.git/commit/?id=cfbcc14c3264ef73f510bae

Reproducer:
# PGSETUP_INITDB_OPTIONS="--locale=cs_CZ.UTF-8" postgresql-setup --unit postgresql60802 --upgrade --debug
DEBUG: using 'upgrade' confdir /etc/postgresql-setup/upgrade
DEBUG: reading config /etc/postgresql-setup/upgrade/postgresql.conf
DEBUG: mode used: upgrade
DEBUG: service name: postgresql60802
DEBUG: running service_configuration() for initdb
DEBUG: unit's datadir: '/var/lib/pgsql/data-tmp'
DEBUG: running service_configuration() for upgrade
DEBUG: unit's datadir: '/var/lib/pgsql/data'
DEBUG: postgresql.conf: /var/lib/pgsql/data/postgresql.conf
ERROR: config file /var/lib/pgsql/data/postgresql.conf is not readable or does not exist
FATAL: Old cluster in '/var/lib/pgsql/data' does not seem to be initialized

Comment 1 Fedora Update System 2015-09-25 13:49:15 UTC
postgresql-9.4.4-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-ba6b14d36d

Comment 2 Fedora Update System 2015-09-27 00:54:47 UTC
postgresql-9.4.4-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update postgresql'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-ba6b14d36d

Comment 3 Fedora Update System 2015-10-04 19:15:30 UTC
postgresql-9.4.4-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.