Re: O(n^2) system calls in RemoveOldXlogFiles()

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: O(n^2) system calls in RemoveOldXlogFiles()
Дата
Msg-id X/6j4E71mBxGnAYE@paquier.xyz
обсуждение исходный текст
Ответ на Re: O(n^2) system calls in RemoveOldXlogFiles()  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
On Tue, Jan 12, 2021 at 12:10:24PM -0300, Alvaro Herrera wrote:
> Apparently b2a5545bd63f changed; before that commit, that code
> (including the quoted comment) was all in RemoveOldXlogFiles, and
> endlogSegNo was calculated only once.  But ISTM that even with that
> formulation it had the problem you point out.  The real problem is the
> loop hidden inside InstallXLogFileSegment().

I am not sure to get your point here.  The purposes of the two
incrementations in InstallXLogFileSegment() and RemoveXlogFile() are
different, still the former incrementation makes the recycling done by
the latter faster,
--
Michael

Вложения

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

Предыдущее
От: "kuroda.hayato@fujitsu.com"
Дата:
Сообщение: RE: ResourceOwner refactoring
Следующее
От: "Hou, Zhijie"
Дата:
Сообщение: RE: Single transaction in the tablesync worker?