Re: making relfilenodes 56 bits

Поиск
Список
Период
Сортировка
От Dilip Kumar
Тема Re: making relfilenodes 56 bits
Дата
Msg-id CAFiTN-un8Q5dOryPnqNvenN6hrDaoBP6C_KJH64v6NMAbHfeHA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: making relfilenodes 56 bits  (Dilip Kumar <dilipbalaut@gmail.com>)
Ответы Re: making relfilenodes 56 bits  (Amul Sul <sulamul@gmail.com>)
Re: making relfilenodes 56 bits  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Thu, Sep 8, 2022 at 4:10 PM Dilip Kumar <dilipbalaut@gmail.com> wrote:

> On a separate note, while reviewing the latest patch I see there is some risk of using the unflushed relfilenumber in
GetNewRelFileNumber()function.  Basically, in the current code, the flushing logic is tightly coupled with the logging
newrelfilenumber logic and that might not work with all the values of the VAR_RELNUMBER_NEW_XLOG_THRESHOLD.  So the
ideais we need to keep the flushing logic separate from the logging, I am working on the idea and I will post the patch
soon.

I have fixed the issue, so now we will track nextRelFileNumber,
loggedRelFileNumber and flushedRelFileNumber.  So whenever
nextRelFileNumber is just VAR_RELNUMBER_NEW_XLOG_THRESHOLD behind the
loggedRelFileNumber we will log VAR_RELNUMBER_PER_XLOG more
relfilenumbers.  And whenever nextRelFileNumber reaches the
flushedRelFileNumber then we will do XlogFlush for WAL upto the last
loggedRelFileNumber.  Ideally flushedRelFileNumber should always be
VAR_RELNUMBER_PER_XLOG number behind the loggedRelFileNumber so we can
avoid tracking the flushedRelFileNumber.  But I feel keeping track of
the flushedRelFileNumber looks cleaner and easier to understand.  For
more details refer to the code in GetNewRelFileNumber().

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: why can't a table be part of the same publication as its schema
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Query Jumbling for CALL and SET utility statements