pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Server deleted then restored - now postgresql will not start
Date: Fri, 22 Apr 2016 10:10:51 +0100
Message-ID: <201604221010.51228.gary.stainburn@ringways.co.uk> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

123-REG have had a problem where some virtual servers were accidentally 
deleted.  My server has finally been restores, but now my Postgresql service 
will not start.  

systemctl start postgresql

returns a failed state.  Both of the following commands gave nothing useful.

systemctl status postgresql
journalctl -xn

The only helpful information I have found is the log file below.

Firstly, I do not want to make the situation worse, but I need to get the 
service fixed.

Can anyone suggest the steps I need to take, or a suitable web page to read.

Gary

[root@vps42342322 pg_log]# cat postgresql-Fri.log
ERROR:  duplicate key value violates unique 
constraint "forum_topics_posted_pkey"
DETAIL:  Key (user_id, topic_id)=(2, 306) already exists.
STATEMENT:  INSERT INTO forum_topics_posted  (user_id, topic_id, topic_posted) 
VALUES (2, 306, 1)
ERROR:  duplicate key value violates unique 
constraint "forum_topics_posted_pkey"
DETAIL:  Key (user_id, topic_id)=(2, 306) already exists.
STATEMENT:  INSERT INTO forum_topics_posted  (user_id, topic_id, topic_posted) 
VALUES (2, 306, 1)
ERROR:  duplicate key value violates unique 
constraint "forum_topics_posted_pkey"
DETAIL:  Key (user_id, topic_id)=(152, 306) already exists.
STATEMENT:  INSERT INTO forum_topics_posted  (user_id, topic_id, topic_posted) 
VALUES (152, 306, 1)
ERROR:  duplicate key value violates unique 
constraint "forum_topics_posted_pkey"
DETAIL:  Key (user_id, topic_id)=(51, 68) already exists.
STATEMENT:  INSERT INTO forum_topics_posted  (user_id, topic_id, topic_posted) 
VALUES (51, 68, 1)
ERROR:  duplicate key value violates unique 
constraint "forum_topics_posted_pkey"
DETAIL:  Key (user_id, topic_id)=(2, 306) already exists.
STATEMENT:  INSERT INTO forum_topics_posted  (user_id, topic_id, topic_posted) 
VALUES (2, 306, 1)
ERROR:  duplicate key value violates unique 
constraint "forum_topics_posted_pkey"
DETAIL:  Key (user_id, topic_id)=(129, 306) already exists.
STATEMENT:  INSERT INTO forum_topics_posted  (user_id, topic_id, topic_posted) 
VALUES (129, 306, 1)
FATAL:  the database system is starting up
FATAL:  the database system is starting up
LOG:  database system was interrupted; last known up at 2016-04-16 07:10:08 
BST
FATAL:  the database system is starting up
FATAL:  the database system is starting up
FATAL:  the database system is starting up
FATAL:  the database system is starting up
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid primary checkpoint record
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 670) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was interrupted; last known up at 2016-04-16 07:10:08 
BST
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid primary checkpoint record
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 1922) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was interrupted; last known up at 2016-04-16 07:10:08 
BST
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid primary checkpoint record
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 2072) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was interrupted; last known up at 2016-04-16 07:10:08 
BST
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid primary checkpoint record
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 2098) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
LOG:  database system was interrupted; last known up at 2016-04-16 07:10:08 
BST
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid primary checkpoint record
LOG:  could not open file "pg_xlog/00000001000000040000003E" (log file 4, 
segment 62): No such file or directory
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 2123) was terminated by signal 6: Aborted
LOG:  aborting startup due to startup process failure
[root@vps45624564 pg_log]# 


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (2+ messages)  latest in thread

Message-ID: <201604221010.51228.gary.stainburn@ringways.co.uk>
Permalink:  ../201604221010.51228.gary.stainburn@ringways.co.uk/
Also on:    postgresql.org/message-id/201604221010.51228.gary.stainburn@ringways.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: gary.stainburn@ringways.co.uk
  Subject: Re: Server deleted then restored - now postgresql will not start
  In-Reply-To: <201604221010.51228.gary.stainburn@ringways.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox