recovery_target_time ignored ?

From: Venkata Balaji N <nag1010(at)gmail(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: recovery_target_time ignored ?
Date: 2015-03-23 04:42:39
Message-ID: CAEyp7J8KMmYiLDuQqeUwGd+na_LoiEyHJxVGH0SLg_XoOsm9Bg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Assuming that this might require a patch, i am posting this in
pgsql-hackers. Apologies, if this is not the appropriate mailing list to
start this discussion.

I performed a PITR and saw the below message in the log file is a bit
confusing.

2015-03-23 13:49:09.816 GMT-10 DB= PID=4707 LOG: * database system was
interrupted; last known up at 2015-03-23 10:30:26 GMT-10*
2015-03-23 13:49:09.817 GMT-10 DB= PID=4707 LOG: * starting point-in-time
recovery to 2015-03-23 10:00:26+10*
2015-03-23 13:49:09.827 GMT-10 DB= PID=4707 LOG: restored log file
"000000010000000B00000020" from archive
2015-03-23 13:49:09.888 GMT-10 DB= PID=4707 LOG: redo starts at B/20000090
2015-03-23 13:49:09.937 GMT-10 DB= PID=4707 LOG: consistent recovery state
reached at B/200000B8
2015-03-23 13:49:09.947 GMT-10 DB= PID=4707 LOG: restored log file
"000000010000000B00000021" from archive
2015-03-23 13:49:09.950 GMT-10 DB= PID=4707 LOG: *recovery stopping before
commit of transaction 16267, time 2015-03-23 13:22:37.53007+10*

By mistake i gave "recovery_target_time" as 10:00 GMT which is 25/30
minutes behind the backup start/end time registered in the backup_label.

The parameter recovery_target_time is ignored and recovery proceeds further
applying all the available WAL Archive files finally ends up bringing up
the database.

I think it would make sense if the recovery does not proceed any further
and error out with a message like "recovery_target_time is behind the
backup time.. please consider using the backup taken prior to the
recovery_target_time"

recovery.conf file is as follows :

restore_command='cp /data/pgdata9400backup/pgwalarch9400backup/%f %p '
recovery_target_time='2015-03-23 10:00:26 GMT-10'
recovery_target_inclusive='true'

If this requires a patch, i would like to take it up.

Regards,
Venkata Balaji N

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2015-03-23 04:54:03 Re: Table-level log_autovacuum_min_duration
Previous Message Tom Lane 2015-03-23 04:36:25 Re: Zero-padding and zero-masking fixes for to_char(float)