FS#21560 - PostgreSQL Upgrade Fails To Start

Attached to Project: Arch Linux
Opened by Carlos Mennens (carlwill) - Monday, 01 November 2010, 15:07 GMT
Last edited by Dan McGee (toofishes) - Tuesday, 02 November 2010, 05:30 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: Upgrading from 8.4 to 9.0.1-2 upgrades fine and then restarting the daemon shows successful however no connections to the server are accessible and the daemon doesn't appear to be running.


Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce: Upgrade 8.4 > 9.0.1-2 and then run '/etc/rc.d/postgresql restart' and it shows no errors but then I attempt to run '/etc/rc.d/postgresql stop' and I get an error that the daemon wasn't even running.

[cmennens@slave ~]$ uname -r
2.6.35-ARCH
[cmennens@slave ~]$ sudo pacman -Qs postgresql
Password:
local/postgresql 9.0.1-2
A sophisticated object-relational DBMS
local/postgresql-libs 9.0.1-2
Libraries for use with PostgreSQL
[cmennens@slave ~]$ sudo /etc/rc.d/postgresql restart
:: Stopping PostgreSQL [BUSY] pg_ctl: PID file "/var/lib/postgres/data/postmaster.pid" does not exist
Is server running?
[FAIL]
:: Starting PostgreSQL [BUSY] server starting
[DONE]
[cmennens@slave ~]$ sudo /etc/rc.d/postgresql stop
:: Stopping PostgreSQL [BUSY] pg_ctl: PID file "/var/lib/postgres/data/postmaster.pid" does not exist
Is server running?
[FAIL]
   arch.txt (1.5 KiB)
This task depends upon

Closed by  Dan McGee (toofishes)
Tuesday, 02 November 2010, 05:30 GMT
Reason for closing:  Deferred
Additional comments about closing:  We need to package this better but this is standard procedure for postgres major releases
Comment by Kim (dedanna1029) - Monday, 01 November 2010, 15:15 GMT
I have the exact same issue - I can confirm this. On boot, when postgresql tries to start, it remains at [BUSY], and never goes to [OK], denoting that it can't start.

I've since tried to start it manually several times, with the exact same errors as the reporter. I've even tried uninstalling and reinstalling it.

uname -a
Linux dedanna.rocks.net 2.6.35-ARCH #1 SMP PREEMPT Wed Sep 29 07:17:20 UTC 2010 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux

Thank you.
Comment by Kim (dedanna1029) - Monday, 01 November 2010, 15:25 GMT Comment by Kent Smith (coat) - Monday, 01 November 2010, 16:26 GMT
What does `tail /var/log/postgresql.log` say?
Comment by Carlos Mennens (carlwill) - Monday, 01 November 2010, 16:29 GMT
[root@slave ~]# ps aux | grep postgres
root 5189 0.0 0.0 8128 956 pts/0 S+ 12:28 0:00 grep postgres
[root@slave ~]# /etc/rc.d/postgresql start
:: Starting PostgreSQL [BUSY] server starting
[DONE]
[root@slave ~]# ps aux | grep postgres
root 5205 0.0 0.0 8128 960 pts/0 R+ 12:28 0:00 grep postgres
[root@slave ~]# tail -n 50 /var/log/postgresql.log
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 8.4, which is not compatible with this version 9.0.1.
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 8.4, which is not compatible with this version 9.0.1.
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 8.4, which is not compatible with this version 9.0.1.
Comment by Carlos Mennens (carlwill) - Monday, 01 November 2010, 16:44 GMT
This is a PostgreSQL issue and nothing pertaining to Arch Linux at all. Please close this ticket.
Comment by Kim (dedanna1029) - Monday, 01 November 2010, 19:37 GMT
Just a quick question please before this gets closed? Is there a way to roll back to 8.4?

Thanks.
Comment by Carlos Mennens (carlwill) - Monday, 01 November 2010, 19:44 GMT
The following worked perfect for me:

* You may be able to downgrade the package trivially by visiting /var/cache/pacman/pkg on your system and seeing if the older version of the package is stored there. (If you have not run pacman -Scc recently, it should be there). If the package is there, you can install that version using pacman -U pkgname-olderpkgver.pkg.tar.gz.

This process will remove the current package, it will carefully calculate all of the dependency changes, and it will install the older version you have chosen with the proper dependencies down the line.

https://wiki.archlinux.org/index.php/Downgrading_Packages#How_to_downgrade_a_package
Comment by Kim (dedanna1029) - Monday, 01 November 2010, 19:46 GMT
Never mind, I got it thanks.


# pacman -U /var/cache/pacman/pkg/postgresql-8.4.4-6-i686.pkg.tar.xz
resolving dependencies...
looking for inter-conflicts...

Targets (1): postgresql-8.4.4-6 [3.78 MB]

Total Download Size: 0.00 MB
Total Installed Size: 21.31 MB

Proceed with installation? [Y/n] y
checking package integrity...
(1/1) checking for file conflicts [######################] 100%
(1/1) upgrading postgresql [######################] 100%

Loading...