Re: Forget close an open relation in ReorderBufferProcessTXN()
От | Tom Lane |
---|---|
Тема | Re: Forget close an open relation in ReorderBufferProcessTXN() |
Дата | |
Msg-id | 3794491.1618507612@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Forget close an open relation in ReorderBufferProcessTXN() (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: Forget close an open relation in ReorderBufferProcessTXN()
|
Список | pgsql-hackers |
Amit Kapila <amit.kapila16@gmail.com> writes: > 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 think this code has a bigger problem: it should not be using RelationIdGetRelation and RelationClose directly. 99.44% of the backend goes through relation_open or one of the other relation.c wrappers, so why doesn't this? Possibly the answer is "it copied the equally misguided code in pgoutput.c". A quick grep shows nothing else doing it this way. regards, tom lane
В списке pgsql-hackers по дате отправления: