Ich benutze Fedora 15mit PostgreSQL 9.1.4. Fedora stürzte kürzlich ab, woraufhin:
Ein Versuch, den PostgreSQL-Server zu starten:
service postgresql-9.1 start
gibt
Starting postgresql-9.1 (via systemctl): Job failed. See system logs and 'systemctl status' for details.
[FAILED]
Obwohl der Server beginnt in der Regel , wenn ich den Server zum ersten Mal nach dem Neustart des Systems starten .
Ein Verwendungsversuch psqlführt jedoch zu folgendem Fehler:
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
.s.PGSQL.5432Datei ist nirgendwo im System vorhanden. A locate .s.PGSQL.5432gibt nichts aus.
Das Systemprotokoll enthält Folgendes:
Aug 14 17:31:58 localhost systemd[1]: postgresql-9.1.service: control process exited, code=exited status=1
Aug 14 17:31:58 localhost systemd[1]: Unit postgresql-9.1.service entered failed state.
EIN
systemctl status postgresql-9.1.service
gibt
postgresql-9.1.service - SYSV: PostgreSQL database server.
Loaded: loaded (/etc/rc.d/init.d/postgresql-9.1)
Active: failed since Tue, 14 Aug 2012 17:31:58 +0530; 58s ago
Process: 2811 ExecStop=/etc/rc.d/init.d/postgresql-9.1 stop (code=exited, status=1/FAILURE)
Process: 12423 ExecStart=/etc/rc.d/init.d/postgresql-9.1 start (code=exited, status=1/FAILURE)
Main PID: 2551 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/postgresql-9.1.service
Ich hatte die Standardeinstellung von fsync nicht geändert, also schätze ich, sie wurde auf eingestellt on. Ich bin auf einer Festplatte. Die Festplatte ist abgestürzt.
Festplattenabsturz
Der Festplattenabsturz führte dazu, dass ein Handbuch fsckauf einer Eingabeaufforderung und nicht auf GUI-Basis ausgeführt wurde. Damit reparierte ich Millionen Inodes usw. Danach startete ich das System mit einem Ctrl+ Alt+ neu Delete.
Das PostgreSQL-Protokoll enthält Folgendes:
LOG: database system was interrupted; last known up at 2012-08-14 17:31:57 IST
LOG: database system was not properly shut down; automatic recovery in progress
LOG: record with zero length at 0/41A4E58
LOG: redo is not required
FATAL: could not access status of transaction 1
DETAIL: Could not open file "pg_multixact/offsets/0000": No such file or directory.
LOG: startup process (PID 13016) exited with exit code 1
LOG: aborting startup due to startup process failure
Aktualisieren
Der Versuch, den Server zu starten, nachdem eine Kopie des /var/lib/pgsqlVerzeichnisses auf Dateisystemebene erstellt und ./pg_resetxlog -f /var/lib/pgsql/9.1/data/mit dem Ergebnis ausgeführt wurde, führt xlog -f /var/lib/pgsql/9.1/data/weiterhin zu folgenden Ergebnissen :
LOG: database system was interrupted; last known up at 2012-08-14 18:46:36 IST
LOG: database system was not properly shut down; automatic recovery in progress
LOG: record with zero length at 0/6000078
LOG: redo is not required
FATAL: could not access status of transaction 1
DETAIL: Could not open file "pg_multixact/offsets/0000": No such file or directory.
LOG: startup process (PID 13766) exited with exit code 1
LOG: aborting startup due to startup process failure
pg_resetxloghat nichts Gutes getan, also bist du auf lustigem Gebiet. Haben Sie eine Sicherungskopie dieser Datenbank vor dem Absturz?
pg_multixact/offsets/0000diese Seite kommen könnten , würde akzeptieren ...