Обсуждение: recovery_target_time and last completed transaction log time

Поиск
Список
Период
Сортировка

recovery_target_time and last completed transaction log time

От
"Kevin Grittner"
Дата:
I'm posting on hackers because I think that there is a problem in one
of three places, and I'm not sure which:
(1)  The documentation needs clarification.
(2)  A LOG message needs clarification.
(3)  There is a bug in recovery.  (unlikely)
This issue was previously posted here with no response:
http://archives.postgresql.org/pgsql-admin/2008-10/msg00123.php
Regarding the documentation -- even if I'm interpreting it correctly,
it might be good to specifically state that it is the commit times of
database transactions which matter for recovery_target_time; that
transactions started but not committed by that time will be omitted,
regardless of the recovery_target_inclusive setting.
Regarding the LOG message, it is confusing to have a recovery.conf
file which contains this:
recovery_target_time = '2008-10-16 17:00:00.0'
and see this in the log:
[2008-10-16 23:04:26.006 CDT] 19951 LOG:  last completed transaction
was at log time 2008-10-16 17:00:23.205347-05
-Kevin


Re: recovery_target_time and last completed transaction log time

От
Tom Lane
Дата:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Regarding the LOG message, it is confusing to have a recovery.conf
> file which contains this:
> recovery_target_time = '2008-10-16 17:00:00.0'
> and see this in the log:
> [2008-10-16 23:04:26.006 CDT] 19951 LOG:  last completed transaction
> was at log time 2008-10-16 17:00:23.205347-05

Actually, I think this *is* a bug: recoveryLastXTime is being set in
entirely the wrong place, ie, where we are *considering* whether to
apply a commit rather than after we have decided to do so.  The
result is just a misleading log message, so not too terrible, but
we should fix it.
        regards, tom lane