Re: Refactor UnpinBuffer()
От | Aleksander Alekseev |
---|---|
Тема | Re: Refactor UnpinBuffer() |
Дата | |
Msg-id | CAJ7c6TPMDutnzi+cVaPzDbgeOZz+AFULkGgUO4i1wAAZg4+SWw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Refactor UnpinBuffer() (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
Ответы |
Re: Refactor UnpinBuffer()
|
Список | pgsql-hackers |
Hi Bharath, > Also, it looks like changing the order of GetPrivateRefCountEntry() > and ResourceOwnerForgetBuffer() doesn't have any effect as they are > independent, but do we want to actually do that if there's no specific > reason? If we keep the order as it is now the code will become: ``` ref = GetPrivateRefCountEntry(b, false); Assert(ref != NULL); ResourceOwnerForgetBuffer(CurrentResourceOwner, b); Assert(ref->refcount > 0); ref->refcount--; if (ref->refcount == 0) ``` I figured it would not hurt to gather all the calls and Asserts related to `ref` together. This is the only reason why I choose to rearrange the order of the calls in the patch. So, no strong opinion in this respect from my side. I'm fine with keeping the existing order. -- Best regards, Aleksander Alekseev
В списке pgsql-hackers по дате отправления: