Re: Make pg_waldump report replication origin ID, LSN, and timestamp.

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Make pg_waldump report replication origin ID, LSN, and timestamp.
Дата
Msg-id YbBfXpo8/O4B7dto@paquier.xyz
обсуждение исходный текст
Ответ на Re: Make pg_waldump report replication origin ID, LSN, and timestamp.  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: Make pg_waldump report replication origin ID, LSN, and timestamp.  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
On Mon, Dec 06, 2021 at 11:24:09PM +0900, Masahiko Sawada wrote:
> On Mon, Dec 6, 2021 at 5:09 PM Michael Paquier <michael@paquier.xyz> wrote:
>> Shouldn't you check for parsed.origin_lsn instead?  The replication
>> origin is stored there as far as I read EndPrepare().
>
> Also, looking at PrepareRedoAdd(), we check the replication origin id.
> So I think that it'd be better to check origin_id for consistency.

Okay, this consistency would make sense, then.  Perhaps some comments
should be added to tell that?

>> Commit records check after XACT_XINFO_HAS_ORIGIN, but
>> xact_desc_abort() may include this information for ROLLBACK PREPARED
>> transactions so we could use the same logic as xact_desc_commit() for
>> the abort case, no?
>
> Good catch! I'll submit an updated patch.

Thanks!
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?