Re: Not deleted mentions of the cleared path
От | Richard Guo |
---|---|
Тема | Re: Not deleted mentions of the cleared path |
Дата | |
Msg-id | CAMbWs4_Fp5tW0C7+CcMbD0mTtL7ReBDoKDBF6wDdqEMYsMbjDg@mail.gmail.com обсуждение исходный текст |
Ответ на | Not deleted mentions of the cleared path (Alena Rybakina <a.rybakina@postgrespro.ru>) |
Ответы |
Re: Not deleted mentions of the cleared path
|
Список | pgsql-hackers |
On Mon, Oct 30, 2023 at 7:31 PM Alena Rybakina <a.rybakina@postgrespro.ru> wrote:
I have already written about the problem of InvalidPath [0] appearing. I investigated this and found an error in the add_path() function, when we reject a path, we free up the memory of the path, but do not delete various mentions of it (for example, in the ancestor of relation, as in the example below).
I agree that what you observed is true - add_path() may free a path
while it's still referenced from some lower rels. For instance, when
creating ordered paths, we may use the input path unchanged without
copying if it's already well ordered, and it might be freed afterwards
if it fails when competing in add_path().
But this doesn't seem to be a problem in practice. We will not access
these references from the lower rels.
I'm not sure if this is an issue that we need to fix, or we need to live
with. But I do think it deserves some explanation in the comment of
add_path().
Thanks
Richard
while it's still referenced from some lower rels. For instance, when
creating ordered paths, we may use the input path unchanged without
copying if it's already well ordered, and it might be freed afterwards
if it fails when competing in add_path().
But this doesn't seem to be a problem in practice. We will not access
these references from the lower rels.
I'm not sure if this is an issue that we need to fix, or we need to live
with. But I do think it deserves some explanation in the comment of
add_path().
Thanks
Richard
В списке pgsql-hackers по дате отправления: