PostgreSQL service won't start after bad computer time

Started by Rob Richardsonalmost 15 years ago4 messagesgeneral
Jump to latest
#1Rob Richardson
Rob.Richardson@rad-con.com

I did some testing involving changing a computer's time, and left the
time one year early (6/3/2010 instead of 2011). The PostgreSQL service
now will not start up. Here's what the log says:

2011-06-03 08:46:50 EDTWARNING: autovacuum not started because of
misconfiguration

2011-06-03 08:46:50 EDTHINT: Enable the "track_counts" option.

2011-06-03 08:46:50 EDTLOG: database system shutdown was interrupted;
last known up at 2011-06-03 08:43:59 EDT

2011-06-03 08:46:50 EDTLOG: database system was not properly shut down;
automatic recovery in progress

2011-06-03 08:46:50 EDTLOG: redo starts at 9/6E08AAB8

2011-06-03 08:46:50 EDTFATAL: the database system is starting up

2011-06-03 08:46:50 EDTFATAL: the database system is starting up

2011-06-03 08:46:51 EDTFATAL: the database system is starting up

2011-06-03 08:46:52 EDTFATAL: the database system is starting up

2011-06-03 08:46:53 EDTFATAL: the database system is starting up

2011-06-03 08:46:54 EDTFATAL: the database system is starting up

2011-06-03 08:46:55 EDTFATAL: the database system is starting up

2011-06-03 08:46:55 EDTFATAL: the database system is starting up

2011-06-03 08:46:56 EDTLOG: record with zero length at 9/8E080968

2011-06-03 08:46:56 EDTLOG: redo done at 9/8E07FA78

2011-06-03 08:46:56 EDTLOG: last completed transaction was at log time
2010-06-03 08:11:17.531-04

2011-06-03 08:46:56 EDTFATAL: xlog flush request 18/A2BE3510 is not
satisfied --- flushed only to 9/8E080968

2011-06-03 08:46:56 EDTCONTEXT: writing block 0 of relation
global/1261_vm

2011-06-03 08:46:56 EDTLOG: startup process (PID 4596) exited with exit
code 1

2011-06-03 08:46:56 EDTLOG: aborting startup due to startup process
failure

How do we recover from this?

RobR

#2Bill Moran
wmoran@potentialtech.com
In reply to: Rob Richardson (#1)
Re: PostgreSQL service won't start after bad computer time

On 6/3/11 8:52:15 AM, Rob Richardson wrote:

I did some testing involving changing a computer�s time, and left the
time one year early (6/3/2010 instead of 2011). The PostgreSQL service
now will not start up. Here�s what the log says:

2011-06-03 08:46:50 EDTWARNING: autovacuum not started because of
misconfiguration

2011-06-03 08:46:50 EDTHINT: Enable the "track_counts" option.

2011-06-03 08:46:50 EDTLOG: database system shutdown was interrupted;
last known up at 2011-06-03 08:43:59 EDT

2011-06-03 08:46:50 EDTLOG: database system was not properly shut down;
automatic recovery in progress

2011-06-03 08:46:50 EDTLOG: redo starts at 9/6E08AAB8

2011-06-03 08:46:50 EDTFATAL: the database system is starting up

2011-06-03 08:46:50 EDTFATAL: the database system is starting up

2011-06-03 08:46:51 EDTFATAL: the database system is starting up

2011-06-03 08:46:52 EDTFATAL: the database system is starting up

2011-06-03 08:46:53 EDTFATAL: the database system is starting up

2011-06-03 08:46:54 EDTFATAL: the database system is starting up

2011-06-03 08:46:55 EDTFATAL: the database system is starting up

2011-06-03 08:46:55 EDTFATAL: the database system is starting up

2011-06-03 08:46:56 EDTLOG: record with zero length at 9/8E080968

2011-06-03 08:46:56 EDTLOG: redo done at 9/8E07FA78

2011-06-03 08:46:56 EDTLOG: last completed transaction was at log time
2010-06-03 08:11:17.531-04

2011-06-03 08:46:56 EDTFATAL: xlog flush request 18/A2BE3510 is not
satisfied --- flushed only to 9/8E080968

2011-06-03 08:46:56 EDTCONTEXT: writing block 0 of relation global/1261_vm

2011-06-03 08:46:56 EDTLOG: startup process (PID 4596) exited with exit
code 1

2011-06-03 08:46:56 EDTLOG: aborting startup due to startup process failure

How do we recover from this?

Reset the time to be correct.

You can't seriously expect something as time-critical as a RDBMS to
function properly if you jockey around making the system time all
fictional?

--
Bill Moran

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bill Moran (#2)
Re: PostgreSQL service won't start after bad computer time

Bill Moran <wmoran@potentialtech.com> writes:

On 6/3/11 8:52:15 AM, Rob Richardson wrote:

I did some testing involving changing a computer�s time, and left the
time one year early (6/3/2010 instead of 2011). The PostgreSQL service
now will not start up. Here�s what the log says:

2011-06-03 08:46:56 EDTLOG: record with zero length at 9/8E080968
2011-06-03 08:46:56 EDTLOG: redo done at 9/8E07FA78
2011-06-03 08:46:56 EDTLOG: last completed transaction was at log time
2010-06-03 08:11:17.531-04
2011-06-03 08:46:56 EDTFATAL: xlog flush request 18/A2BE3510 is not
satisfied --- flushed only to 9/8E080968
2011-06-03 08:46:56 EDTCONTEXT: writing block 0 of relation global/1261_vm

How do we recover from this?

Reset the time to be correct.

I don't think that failure has anything to do with system clock time.
It looks more like filesystem corruption or missing pg_xlog files.

regards, tom lane

#4Rob Richardson
Rob.Richardson@rad-con.com
In reply to: Tom Lane (#3)
Re: PostgreSQL service won't start after bad computer time

My thanks for your replies. We used pg_resetxlog to clear things up.
The database was not in active use, so the loss of the transactions
didn't matter.

RobR