Re: A new message seems missing a punctuation

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: A new message seems missing a punctuation
Дата
Msg-id CA+TgmoZzgu+izr5MUGxdjr5kYdxY385ZQWJMY-sM3pmWY8pGeg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: A new message seems missing a punctuation  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: A new message seems missing a punctuation  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Mon, Feb 19, 2024 at 11:04 AM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
> Or I thought the values could be moved to DETAILS: line.

Yeah, I think that's likely to be the right approach here. The details
aren't too clear to me.

Does the primary error message really need to say "could not sync
slot"? If it will be obvious from context that we were trying to sync
a slot, then it would be fine to just say "ERROR: remote slot precedes
local slot".

But I also don't quite understand what problem this is trying to
report. Is this slot-syncing code running on the primary or the
standby? If it's running on the primary, then surely it's expected
that the remote slot will precede the local one. And if it's running
on the standby, then the comments in
update_and_persist_local_synced_slot about waiting for the remote side
to catch up seem quite confusing, because surely we're chasing the
primary and not the other way around?

But if we ignore all of that, then we could just do this:

ERROR: could not sync slot information as remote slot precedes local slot
DETAIL: Remote slot has LSN %X/%X and catalog xmin %u, but remote slot
has LSN %X/%X and catalog xmin %u.

which would fix the original complaint, and my point about using
English rather than just printing a bunch of values.

--
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Injection points: some tools to wait and wake
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Fix race condition in InvalidatePossiblyObsoleteSlot()