Re: pgsql: Add contrib/pg_walinspect.

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: pgsql: Add contrib/pg_walinspect.
Дата
Msg-id c094bde0d6a984e21535fc66d31dc0f0b4ff4d6a.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: pgsql: Add contrib/pg_walinspect.  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Fri, 2022-04-29 at 10:46 +0530, Bharath Rupireddy wrote:
> It's not just the flush ptr, without no wait mode, the functions
> would
> wait if start/input lsn is, say current flush lsn - 1 or 2 or more
> (before the previous record) bytes. If the functions were to wait, by
> how much time should they wait? a timeout? forever?

I see, you're talking about the case of XLogFindNextRecord(), not
XLogReadRecord().

XLogFindNextRecord() is the only way to align the user-provided start
LSN on a valid record, but that calls XLogReadRecord(), which may wait
indefinitely. If there were a different entry point that just did the
alignment and skipped past continuation records, we could prevent it
from trying to read the next record if we are already at the flush
pointer. But without some tweak to that API, nowait is still needed.

Committed your v3 patch with minor modifications.

Regards,
    Jeff Davis





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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Missing can't-assign-to-constant checks in plpgsql
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: bogus: logical replication rows/cols combinations