postgresql-server-9.3.3-11.x86_64 update fails

Non-LTS (non-Marathon) related topics
Ответить
Mayavimmer
Сообщения: 51
Зарегистрирован: 14 мар 2013, 13:12
Operating system: Rosa Fresh 2012.1 64bit

postgresql-server-9.3.3-11.x86_64 update fails

Сообщение Mayavimmer » 03 апр 2014, 15:07

postgresql-server-9.3.3-11.x86_64 update fails: I click update, it downloads the package, pops up informative dialog, I click ok, it terminates with no apparent error messages. Then it reloads the app and says that the same package needs updating.

Two further problems become evident if you try again:

1. It downloads the package again. I think this is a separate bug and I am opening a separate topic.

2. The informative dialog leads to clicking "Upgrade information about this package" which come up empty.

I ran it again from the root console:

Код: Выделить всё

retrieving rpm files from medium "Main_64_updates"...
retrieved   postgresql-server-9.3.3-11-rosa2012.1.x86_64.rpm
...retrieving done


installing postgresql-server-9.3.3-11-rosa2012.1.x86_64.rpm from /var/cache/urpmi/rpms
starting installing packages
created transaction for installing on / (remove=0, install=0, upgrade=1)

You currently have database tree for Postgresql 9.0
You must use postgresql9.0-server
To update you Postgresql server, dump your databases
delete /var/lib/pgsql/data/ content, upgrade the server, then
restore your databases from your backup

error: %pre(postgresql-server-9.3.3-11.x86_64) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping postgresql-server-9.3.3-11.x86_64
Failed to issue method call: Unit postgresql9.3.service failed to load: No such file or directory.
removing installed rpms (postgresql-server-9.3.3-11-rosa2012.1.x86_64.rpm) from /var/cache/urpmi/rpms
----------------------------------------------------------------------
More information on package postgresql-server-9.3.3-11-rosa2012.1.x86_64

----------------------------------------------------------------------

d_uragan
Сообщения: 505
Зарегистрирован: 23 ноя 2011, 21:27

Re: postgresql-server-9.3.3-11.x86_64 update fails

Сообщение d_uragan » 03 апр 2014, 16:22

Собственно, пакет все сообщил при установке - он нашел у вас базы от postgresql9.0 и рекомендует сначала сделать дамп этих баз с использованием postgresql9.0 и удалить директорию /var/lib/pgsql/data/. Потому уже поставить postgresql-9.3 и восстановить базы из дампа. Это сейчас самый надежный способ переехать с 9.0 на 9.3. Можно, конечно, pg_upgrade попробовать использовать, но тут гарантий меньше, а выигрыш в скорости по сравнению с dump/restore не всегда сильно ощутим.

Если у вас нет реальных баз, просто удалите /var/lib/pgsql/data

d_uragan
Сообщения: 505
Зарегистрирован: 23 ноя 2011, 21:27

Re: postgresql-server-9.3.3-11.x86_64 update fails

Сообщение d_uragan » 03 апр 2014, 17:12

Sorry for Russian in the English-speaking forum:)

The answer is that this behavior is expected. The new postgresql has detected that you have some databases left from postgresql-9.0. It is not safe to just update postgresql from 9.0 to 9.3; it is recommended to first dump all the databases and remove /var/lib/pgsql/data/ folder. Then install the new postgresql and restore the databases. This is the most reliable way of migration from 9.0 to 9.3; one could use pg_upgrade, but it gives less guarantees and only a little speed up.

Finally, if you really don't have any databases that you care about, just remove the whole /var/lib/pgsql/data/ folder.

Ответить

Вернуться в «ROSA Fresh R1-R3 (2012.1)»