Thread: Can't start postgresql server

Can't start postgresql server

From
ChoonSoo Park
Date:
Hi,

From the pg_log folder, I can locate the following errors:

LOG:  database system was interrupted while in recovery at log time 2014-06-06 22:35:38 UTC
HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.
LOG:  could not open tablespace directory "pg_tblspc/30022/PG_9.1_201105231": No such file or directory
LOG:  could not open tablespace directory "pg_tblspc/30023/PG_9.1_201105231": No such file or directory
LOG:  entering standby mode
LOG:  redo starts at 3/AD000020
FATAL:  online backup was canceled, recovery cannot continue
CONTEXT:  xlog redo checkpoint: redo 3/AD044D38; tli 26; xid 0/156687; oid 249448; multi 9; offset 17; oldest xid 1791 in DB 1; oldest running xid 0; shutdown
LOG:  startup process (PID 22536) exited with exit code 1
LOG:  terminating any other active server processes
LOG:  database system was interrupted while in recovery at log time 2014-06-06 22:35:38 UTC
HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.
LOG:  could not open tablespace directory "pg_tblspc/30022/PG_9.1_201105231": No such file or directory
LOG:  could not open tablespace directory "pg_tblspc/30023/PG_9.1_201105231": No such file or directory
LOG:  entering standby mode
LOG:  redo starts at 3/AD000020
FATAL:  online backup was canceled, recovery cannot continue

Same errors repeat.

30022 & 30023 are symbolic links under data/pg_tblspc folder. Their target directories are lost somehow. Does it cause this problem? I tried to delete those 2 symbolic links but postgresql still can't start up.

Just wonder what is causing the postgresql to throw an error.

>> HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.

Where can I specify recovery target? 

Thank you,
Choon Park

Re: Can't start postgresql server

From
Michael Paquier
Date:



On Wed, Jun 25, 2014 at 5:37 AM, ChoonSoo Park <luispark@gmail.com> wrote:
30022 & 30023 are symbolic links under data/pg_tblspc folder. Their target directories are lost somehow. Does it cause this problem? I tried to delete those 2 symbolic links but postgresql still can't start up.
Just wonder what is causing the postgresql to throw an error.

>> HINT:  If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.
If those tablespaces got *lost*, you have a problem with your infrastructure and should try to recover them, in your case recovery is trying to apply WAL changes to those relations and cannot find them, showing the failure you are seeing here. The best thing you could do is to recover your cluster with a fresh backup, backup that includes those tablespaces as well.

Where can I specify recovery target?
Here are more details about recovery targets via recovery.conf:
http://www.postgresql.org/docs/devel/static/recovery-target-settings.html
--
Michael