Re: pgsql: Improve runtime and output of tests for replication slots checkp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql: Improve runtime and output of tests for replication slots checkp
Дата
Msg-id 2594452.1750462958@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgsql: Improve runtime and output of tests for replication slots checkp  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-committers
Alexander Korotkov <aekorotkov@gmail.com> writes:
> And I see the following variable values.

> (lldb) p/x targetPagePtr
> (XLogRecPtr) 0x0000000029004000
> (lldb) p/x RecPtr
> (XLogRecPtr) 0x0000000029002138

> I hardly understand how is this possible given it was compiled with "-O0".
> I'm planning to continue investigating this tomorrow.

Yeah, I see

(lldb) p/x targetPagePtr
(XLogRecPtr) 0x0000000029004000
(lldb) p/x RecPtr
(XLogRecPtr) 0x0000000029002138
(lldb) p/x RecPtr - (RecPtr % 8192)
(XLogRecPtr) 0x0000000029002000

We're here:

            /* Calculate pointer to beginning of next page */
            targetPagePtr += XLOG_BLCKSZ;

            /* Wait for the next page to become available */
            readOff = ReadPageInternal(state, targetPagePtr,
                                       Min(total_len - gotlen + SizeOfXLogShortPHD,
                                           XLOG_BLCKSZ));

so that's where the increment of targetPagePtr came from.
But "Wait for the next page to become available" seems awfully
trusting that there will be another page.  Should this be
using the no-wait code path?

            regards, tom lane



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