Re: POC: Cleaning up orphaned files using undo logs

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: POC: Cleaning up orphaned files using undo logs
Дата
в 15:06:58
Msg-id
CA+Tgmobo_Eekkcs7dA=P356Qzf7nX+gduXSvnRbGSNad7snLDA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
POC: Cleaning up orphaned files using undo logs Thomas Munro <thomas.munro@enterprisedb.com>
Re: POC: Cleaning up orphaned files using undo logs Robert Haas <robertmhaas@gmail.com>
Re: POC: Cleaning up orphaned files using undo logs Kuntal Ghosh <kuntalghosh.2007@gmail.com>
Re: POC: Cleaning up orphaned files using undo logs Thomas Munro <thomas.munro@enterprisedb.com>
Re: POC: Cleaning up orphaned files using undo logs Dmitry Dolgov <9erthalion6@gmail.com>
Re: POC: Cleaning up orphaned files using undo logs Thomas Munro <thomas.munro@enterprisedb.com>
Re: POC: Cleaning up orphaned files using undo logs Andres Freund <andres@anarazel.de>
Re: POC: Cleaning up orphaned files using undo logs Thomas Munro <thomas.munro@gmail.com>
Re: POC: Cleaning up orphaned files using undo logs Shawn Debnath <sdn@amazon.com>
Re: POC: Cleaning up orphaned files using undo logs Dilip Kumar <dilipbalaut@gmail.com>
Re: POC: Cleaning up orphaned files using undo logs Robert Haas <robertmhaas@gmail.com>
Re: POC: Cleaning up orphaned files using undo logs Dilip Kumar <dilipbalaut@gmail.com>
Re: POC: Cleaning up orphaned files using undo logs Robert Haas <robertmhaas@gmail.com>
Re: POC: Cleaning up orphaned files using undo logs Dilip Kumar <dilipbalaut@gmail.com>
On Fri, May 3, 2019 at 12:46 AM Dilip Kumar  wrote:
> I might be completely missing but (ptr - array_base) is only valid
> when first time you get the array, but qsort will swap the element
> around and after that you will never be able to make out which element
> was at lower index and which one was at higher index.   Basically, our
> goal is to preserve the order of the undo record for the same block
> but their order might get changed due to swap when they are getting
> compared with the undo record pointer of the another block and once
> the order is swap we will never know what was their initial positions?

*facepalm*

Yeah, you're right.

Still, I think we should see if there's some way of getting rid of
that structure, or at least making it an internal detail that is used
by the code that's doing the sorting rather than something that is
exposed as an external interface.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления
От: Justin Pryzby
Дата:
От: Andres Freund
Дата:
FAQ