Re: Forget close an open relation in ReorderBufferProcessTXN()

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Forget close an open relation in ReorderBufferProcessTXN()
Дата
Msg-id CAA4eK1LJpLdDQOhFO00dwqDU2SJe0x7gcdX_Z_9z7KvC_WrPTg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Forget close an open relation in ReorderBufferProcessTXN()  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Forget close an open relation in ReorderBufferProcessTXN()  (Japin Li <japinli@hotmail.com>)
Список pgsql-hackers
On Thu, Apr 15, 2021 at 4:53 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Thu, Apr 15, 2021 at 4:00 PM Japin Li <japinli@hotmail.com> wrote:
> >
> > The RelationIdGetRelation() comment says:
> >
> > > Caller should eventually decrement count. (Usually,
> > > that happens by calling RelationClose().)
> >
> > However, it doesn't do it in ReorderBufferProcessTXN().
> > I think we should close it, here is a patch that fixes it. Thoughts?
> >
>
> +1. Your fix looks correct to me but can we test it in some way?
>

I have tried to find a test but not able to find one. I have tried
with a foreign table but we don't log truncate for it, see
ExecuteTruncate. It has a check that it will log for relids where
RelationIsLogicallyLogged. If that is the case, it is not clear to me
how we can ever hit this condition? Have you tried to find the test?

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: "Andres Freund"
Дата:
Сообщение: Re: terminate called after throwing an instance of 'std::bad_alloc'
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Forget close an open relation in ReorderBufferProcessTXN()