Re: [HACKERS] Broken O(n^2) avoidance in wal segment recycling.

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Broken O(n^2) avoidance in wal segment recycling.
Дата
Msg-id CAB7nPqTB3VcKSSrW2Qj59tYYR2H4+n=5pZbdWou+X9iqVNMCag@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Broken O(n^2) avoidance in wal segment recycling.  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [HACKERS] Broken O(n^2) avoidance in wal segment recycling.  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, Jun 23, 2017 at 3:25 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Thu, Jun 22, 2017 at 6:10 AM, Andres Freund <andres@anarazel.de> wrote:
>> We've not heard any complaints about this afaik, but it's not something
>> that's easily diagnosable as being a problem.  Therefore I suspect we
>> should fix and backpatch this?
>
> Agreed. I have just poked at this problem and have finished with the
> attached. Logically it is not complicated at the argument values used
> by the callers of RemoveXlogFile() are never updated when scanning
> pg_wal. Surely this patch needs an extra pair of eyes.

Andres has pointed me out offline that a bad copy-paste re-introduced
fb886c15. So it is important to properly track the segment name of the
switch point as well as the the segment from where the recycling
begins. There was as well a second mistake in RemoveOldXlogFiles()
causing unnecessary segments to be kept caused by the same copy-pasto.
-- 
Michael

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: [HACKERS] Multi column range partition table
Следующее
От: Kuntal Ghosh
Дата:
Сообщение: Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT