Re: Confusing recovery message when target not hit

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Confusing recovery message when target not hit
Дата
Msg-id CAB7nPqR7Zs8BPARem6MXTQweDaS-RyXoOZ5u1kyoQW5=SY6ybw@mail.gmail.com
обсуждение исходный текст
Ответ на Confusing recovery message when target not hit  (Thom Brown <thom@linux.com>)
Ответы Re: Confusing recovery message when target not hit  (David Steele <david@pgmasters.net>)
Re: Confusing recovery message when target not hit  (Thom Brown <thom@linux.com>)
Список pgsql-hackers
On Sat, Jun 11, 2016 at 9:44 AM, Thom Brown <thom@linux.com> wrote:
> It may be the wrong way of going about it, but you get the idea of what I'm
> suggesting we output instead.

Surely things could be better. So +1 to be more verbose here.

+            if (recoveryStopTime == 0)
+                snprintf(reason, sizeof(reason),
+                        "recovery reached consistency before recovery
target time of \"%s\"\n",
+                        timestamptz_to_str(recoveryTargetTime));
"Reaching consistency" is not exact for here. I'd rather say "finished
recovery without reaching target blah"

+            if (recoveryStopXid == 0)
Checking for InvalidTransactionId is better here.

And it would be good to initialize recoveryStopTime and
recoveryStopXid as those are set only when a recovery target is
reached.
-- 
Michael



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Don't generate parallel paths for rels with parallel-restricted
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <