Re: removing global variable ThisTimeLineID

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: removing global variable ThisTimeLineID
Дата
Msg-id YYnrbd/qlNZz3xic@paquier.xyz
обсуждение исходный текст
Ответ на Re: removing global variable ThisTimeLineID  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: removing global variable ThisTimeLineID  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Mon, Nov 08, 2021 at 12:49:52PM -0500, Robert Haas wrote:
> Even with this patch, the name ThisTimeLineID is still used for
> multiple purposes. It remains part of the CheckPoint struct, and also
> part of the xl_end_of_recovery struct. But in both of those cases, the
> name ThisTimeLineID actually makes sense, because what we're thinking
> about is whether there's a timeline change, so we have ThisTimeLineID
> and PrevTimeLineID and it seems fairly clear what that's supposed to
> mean.

I got to wonder if it would be better to bite the bullet here for
these two looking at your patch, but I am fine to keep things as they
are, as well.

> Thoughts?

I think that this patch is an improvement.

@@ -6686,8 +6682,8 @@ StartupXLOG(void)
-   TimeLineID  ThisTimeLineID,
-               PrevTimeLineID;
+   TimeLineID  replayTLI,
+               newTLI;
One problem with newTLI is that this conflicts with the declaration
around 7663 in xlog.c, where we check after a TLI switch when
replaying such a record.  Perhaps this could be named newInsertTLI,
for example.
--
Michael

Вложения

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

Предыдущее
От: Greg Nancarrow
Дата:
Сообщение: Re: Failed transaction statistics to measure the logical replication progress
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: [PATCH] pg_stat_statements Configuration Parameters Documentation