Nefunkční upgrade PostgreSQL v Debianu

stewe

Nefunkční upgrade PostgreSQL v Debianu
« kdy: 28. 02. 2012, 18:54:16 »
zdravim,

pred pol hodinou som po apt-get update & upgrade isiel preinstalovat postgresql ale ake bolo moje prekvapenie, ked ten upgrade zlyhal. vymazal som uplne cely postgres (s purge volbou) aj postgresql-common a isiel som to naistalovat cele znova. ta chyba sa ale opakuje, toto je ten output:

Kód: [Vybrat]
[564] ^_^ [root@server:/usr]# aptitude install  postgresql-8.4
The following NEW packages will be installed:
  postgresql-8.4 postgresql-common{a}
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 5485 kB of archives. After unpacking 16.2 MB will be used.
Do you want to continue? [Y/n/?] Y
Get:1 http://ftp.debian.org/debian/ squeeze/main postgresql-common all 113 [127 kB]
Get:2 http://security.debian.org/ squeeze/updates/main postgresql-8.4 i386 8.4.11-0squeeze1 [5357 kB]
Fetched 5485 kB in 7min 11s (12.7 kB/s)                                                                                                                       
Preconfiguring packages ...
Selecting previously deselected package postgresql-common.
(Reading database ... 53341 files and directories currently installed.)
Unpacking postgresql-common (from .../postgresql-common_113_all.deb) ...
Selecting previously deselected package postgresql-8.4.
Unpacking postgresql-8.4 (from .../postgresql-8.4_8.4.11-0squeeze1_i386.deb) ...
Processing triggers for man-db ...
Setting up postgresql-common (113) ...
Setting up postgresql-8.4 (8.4.11-0squeeze1) ...
Creating new cluster (configuration: /etc/postgresql/8.4/main, data: /var/lib/postgresql/8.4/main)...
Moving configuration file /var/lib/postgresql/8.4/main/postgresql.conf to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_hba.conf to /etc/postgresql/8.4/main...
Moving configuration file /var/lib/postgresql/8.4/main/pg_ident.conf to /etc/postgresql/8.4/main...
Configuring postgresql.conf to use port 5432...
update-alternatives: using /usr/share/postgresql/8.4/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode.
Starting PostgreSQL 8.4 database server: main

Tu sa to ale sekne asi na pol minuty, a potom vylezie hrozostrasny error log

Kód: [Vybrat]
Use of uninitialized value $logsize in numeric gt (>) at /usr/bin/pg_ctlcluster line 235.

tato hlaska sa napise asi 50 krat za sebou, potom nasleduje:
Kód: [Vybrat]
The PostgreSQL server failed to start. Please check the log output. ... failed!
 failed!
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-8.4 (--configure):
 subprocess installed post-installation script returned error exit status 1
configured to not write apport reports
                                      Errors were encountered while processing:
 postgresql-8.4
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up postgresql-8.4 (8.4.11-0squeeze1) ...

zasa ta ista chyba 50 krat a na koniec:

Kód: [Vybrat]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-8.4 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 postgresql-8.4

a potom ma to hodi do shellu.

neviem kde moze  byt chyba, ten riadok 235 v /usr/bin/pg_ctlcluster vyzera takto:

Kód: [Vybrat]
233         # if the postmaster wrote something, but the process does not exist any
234         # more, there must be a problem and we can stop immediately
235         last if ($currlogsize > $logsize && !check_running_postmaster $pidfile);
236     }

/var/run/postgresql/ je prazdne ...

nechapem ze to nefici, je to balik instalovany uplne na cisto, po apt-get purge, skusil som ten riadok zakomentovat ale vyhuhlo to tiez, v logu nebolo nic, ak to spustim rucne cez postgres usera tak samotna binarka ide,

Kód: [Vybrat]
postgres@server:~$ /usr/lib/postgresql/8.4/bin/postmaster --config-file=/etc/postgresql/8.4/main/postgresql.conf
2012-02-28 18:52:28 CET LOG:  database system was shut down at 2012-02-28 18:45:35 CET
2012-02-28 18:52:28 CET LOG:  database system is ready to accept connections
2012-02-28 18:52:28 CET LOG:  autovacuum launcher started

ale cez /etc/init.d/postgresql start ani za nic ;/// a to teda na.ere

najhorsie je ze mi na tom bezi jeden web, ktory je teraz tym padom offline
« Poslední změna: 29. 02. 2012, 10:00:41 od Petr Krčmář »


thomas

Re:nefunkcny upgrade postgresql v debiane
« Odpověď #1 kdy: 28. 02. 2012, 19:25:13 »
Když jsem pročítal članek aktualizace z Lenny na Squeeze, tak je zde pasáž i o postgresql. Možná je to i stejný případ u tebe.
http://www.root.cz/clanky/upgrade-debianu-lenny-na-squeeze-prakticke-zkusenosti/


stewe

Re:nefunkcny upgrade postgresql v debiane
« Odpověď #2 kdy: 28. 02. 2012, 19:49:01 »
dakujem za odpoved, ale nie je to moj pripad. neupgradeujem medzi lenny a squeeze, som na squeeze a len upgradeujem databazu. ale mrknem na to. diky

JD

Re:nefunkcny upgrade postgresql v debiane
« Odpověď #3 kdy: 29. 02. 2012, 01:52:19 »
Pred chvilou som urobil upgrade na tuto verziu a bez problemov to funguje. Takze predpokladam, ze chyba bude niekde v tejto konkretnej instalacii.

Odporucam pozriet konfiguraciu (/etc/postgresql/8.4/main/...) a pripadne aj logy vo /var/log/postgresql/ (ak je to standardna instalacia bez zmeny logovacieho suboru).

A kedze pg_ctlcluster moze spustat rozlicne verzie/clustre, skus pozriet aj ci nahodou v /etc/postgresql/ nie su aj nejake dalsie (starsie) konfiguracie, pripadne ine clustre, ktore mozu sposobovat problem.

stewe

Re:Nefunkční upgrade PostgreSQL v Debianu
« Odpověď #4 kdy: 29. 02. 2012, 11:13:07 »
som zufaly. vymazal som UPLNE vsetko co sa tyka postgresu a vypisuje to stale tu istu chybu. je tu nejaka moznost vratit sa o verziu spat?

dalej by ma zaujimalo, preco sa po instalacii debian snazi hned tu databazu spustit, podla mna by si to mal admin spustit sam, neviem preco je debian taky napomocny a spusta to hned ako sa to nainstaluje ... 


stewe

Re:Nefunkční upgrade PostgreSQL v Debianu
« Odpověď #5 kdy: 29. 02. 2012, 11:41:16 »
skusal som nainstalovat postgresql-9.1 z backportov ale nastala ta ista chyba, co je velmi velmi zle pretoze mam nejaky rozbity system.

stewe

Re:Nefunkční upgrade PostgreSQL v Debianu
« Odpověď #6 kdy: 29. 02. 2012, 13:36:50 »
skompiloval som to zo zdrojakov a rozbehol to rucne.