Re: False "pg_serial": apparent wraparound” in logs

Поиск
Список
Период
Сортировка
От Imseih (AWS), Sami
Тема Re: False "pg_serial": apparent wraparound” in logs
Дата
Msg-id C3729C49-563F-42D8-84D5-78C0BA116052@amazon.com
обсуждение исходный текст
Ответ на Re: False "pg_serial": apparent wraparound” in logs  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: False "pg_serial": apparent wraparound” in logs  ("Imseih (AWS), Sami" <simseih@amazon.com>)
Re: False "pg_serial": apparent wraparound” in logs  (Michael Paquier <michael@paquier.xyz>)
Re: False "pg_serial": apparent wraparound” in logs  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
> I think the smallest fix here would be to change CheckPointPredicate()
> so that if tailPage > headPage, pass headPage to SimpleLruTruncate()
> instead of tailPage. Or perhaps it should go into the "The SLRU is no
> longer needed" codepath in that case. If tailPage > headPage, the SLRU
> isn't needed at the moment.

I spent sometime studying this and it appears to be a good approach. 

Passing the cutoff page as headPage (SLRU not needed code path ) instead of the tailPage to 
SimpleLruTruncate is already being done when the tailXid is not a valid XID. 
I added an additional condition to make sure that the tailPage proceeds the headPage
as well. 

Attached is v2 of the patch.

> In addition to that, we could change SerialAdd() to not zero out the
> pages between old headXid and tailXid unnecessarily, but that's more of
> an optimization than bug fix.

Yes, I did notice that in my debugging, but will not address this in the current patch.


Regards,

Sami


Вложения

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

Предыдущее
От: Gurjeet Singh
Дата:
Сообщение: Re: [PoC/RFC] Multiple passwords, interval expirations
Следующее
От: "Imseih (AWS), Sami"
Дата:
Сообщение: Re: False "pg_serial": apparent wraparound” in logs