psql: FATAL: the database system is starting up

From: Sebastian Machuca <serroba(at)gmail(dot)com>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: psql: FATAL: the database system is starting up
Date: 2010-06-23 20:18:33
Message-ID: AANLkTilsxZ_48WIOmF_JWsfOJOqOLw5dr0X0AkSo936Z@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Hola a todos. Me surgio un problema con un motor.

Primero algunos datos previos:

OS: Red Hat
Version 8.3
Size 15 GB

Se lleno la partición donde tenia el motor, ya me había ocurrido algo
similar hace algún tiempo, y la solución que tome fue simple. Moví la
carpeta "data" a una partición con mayor espacio y después un
enlace simbólico. Lo tenia en el clásico /var/lib/pgsql/data y lo deje en
/opt/postgres/data
Ahora, el problema es cuando trato de levantar el motor. Me sale lo
siguiente:

psql: FATAL: the database system is starting up

Y nunca avanza de ahi.
Ahora anexo informacion que es de interes para el problema:

---------------------------------------------------------------------------------------------------------------
*$ ps aux | grep postgres*
root 24586 0.0 0.1 4920 1236 pts/2 S 10:52 0:00 su -
postgres
postgres 24587 0.0 0.1 4540 1440 pts/2 S+ 10:52 0:00 -bash
root 27444 0.0 0.1 4920 1240 pts/1 S 14:40 0:00 su -
postgres
postgres 27445 0.0 0.1 4536 1436 pts/1 S+ 14:40 0:00 -bash
root 27593 0.0 0.1 4920 1244 pts/3 S 14:44 0:00 su -
postgres
postgres 27594 0.0 0.1 4540 1468 pts/3 S 14:44 0:00 -bash
postgres 27725 4.1 0.8 283372 7236 pts/3 S 14:47 0:00
/usr/bin/postgres
postgres 27726 0.0 0.0 13952 696 ? Ss 14:47 0:00 postgres:
logger process
postgres 27727 2.0 0.5 283640 4828 ? Ds 14:47 0:00 postgres:
startup process recovering 000000010000001A00000074
postgres 27730 0.0 0.1 4260 940 pts/3 R+ 14:48 0:00 ps aux
postgres 27731 0.0 0.0 3920 696 pts/3 S+ 14:48 0:00 grep
postgres
---------------------------------------------------------------------------------------------------------------

*$ pg_ctl status*
pg_ctl: server is running (PID: 27725)
/usr/bin/postgres

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

*$ pg_controldata *
pg_control version number: 843
Catalog version number: 200904091
Database system identifier: 5409925551577885669
Database cluster state: in crash recovery
pg_control last modified: Wed 23 Jun 2010 11:20:42 AM CLT
Latest checkpoint location: 1A/73839208
Prior checkpoint location: 1A/73839208
Latest checkpoint's REDO location: 1A/7382D978
Latest checkpoint's TimeLineID: 1
Latest checkpoint's NextXID: 0/47874035
Latest checkpoint's NextOID: 51407
Latest checkpoint's NextMultiXactId: 1647347
Latest checkpoint's NextMultiOffset: 3431468
Time of latest checkpoint: Sun 30 May 2010 11:10:30 AM CLT
Minimum recovery ending location: 0/0
Maximum data alignment: 4
Database block size: 8192
Blocks per segment of large relation: 131072
WAL block size: 8192
Bytes per WAL segment: 16777216
Maximum length of identifiers: 64
Maximum columns in an index: 32
Maximum size of a TOAST chunk: 2000
Date/time type storage: 64-bit integers
Float4 argument passing: by value
Float8 argument passing: by reference

---------------------------------------------------------------------------------------------------------------
El ultimo dia que tuvo transacciones, termino con este log
*
*
*$ tail PG_DATA/pg_log/postgresql-Sun.log*
ERROR: null value in column "protocolo" violates not-null constraint
STATEMENT: INSERT INTO trx_5(nodo, puerto, dnis, ani, protocolo, time,
status, service, fecha, trama) VALUES (2, 1, 900, 0, (SELECT pk FROM
protocolos WHERE data = 78), 247, (SELECT pk FROM status WHERE status = 55),
(SELECT pk FROM services WHERE service = 0),now(), (SELECT pk FROM tramas
WHERE equipo = 2 AND puerto = 1))
LOG: could not write temporary statistics file "pg_stat_tmp/pgstat.tmp": No
space left on device
LOG: could not write temporary statistics file "pg_stat_tmp/pgstat.tmp": No
space left on device
LOG: could not write temporary statistics file "pg_stat_tmp/pgstat.tmp": No
space left on device
LOG: could not write temporary statistics file "pg_stat_tmp/pgstat.tmp": No
space left on device
LOG: could not write temporary statistics file "pg_stat_tmp/pgstat.tmp": No
space left on device
LOG: could not write temporary statistics file "pg_stat_tmp/pgstat.tmp": No
space left on device
LOG: could not write temporary statistics file "pg_stat_tmp/pgstat.tmp": No
space left on device
LOG: could not write temporary statistics file "pg_stat_tmp/pgstat.tmp": No
space left on device
LOG: could not write temporary statistics file "pg_st-bash-3.2$

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

*$ psql*
psql: FATAL: the database system is starting up

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

No tengo instalado en la maquina lsof, pero si tengo
alguna información adicional.

Haciendo un vmstat se puede apreciar un alto uso de *wa *sobre un 50%,
constante. El uso de %CPU es muy bajo, como un 2%

Revisando bajo /proc/27725/ (el pid de postgres 27727 2.0 0.5 283640 4828
? Ds 14:47 0:00 postgres: startup process recovering
000000010000001A00000074) el fichero *io*
Una taza de escritura bastante alta. Del orden de 1 GB por cada 20 minutos
aprox. Sin embargo, no tengo idea donde esta escribiendo.

Alguna sugerencia de que puedo hacer??? Por ahora estoy esperando, volveré a
revisar el servidor en unas 20 horas mas, pues no tengo acceso al servidor
en forma directa.

--
Sebastian Machuca
Estudiante Ingeniería Civil en Computación
+56 9 77449117
http://twitter.com/serroba

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alvaro Herrera 2010-06-23 21:20:32 Re: psql: FATAL: the database system is starting up
Previous Message Jaime Casanova 2010-06-22 20:46:37 Re: [pgsql-es-ayuda] Ejecuté initdb y no encunetro mi base de datos