Re: Unify drop-by-OID functions

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Unify drop-by-OID functions
Дата
Msg-id CA+TgmoYhgjHm6map2pAic=kh-YkEdVzgKsrbi+PmrqizaiKAYA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Unify drop-by-OID functions  (Ranier Vilela <ranier.vf@gmail.com>)
Ответы Re: Unify drop-by-OID functions  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
On Tue, May 5, 2020 at 1:22 PM Ranier Vilela <ranier.vf@gmail.com> wrote:
> Ok, so the question. If (3) is not safe, obvious we shouldn't use, and must call table_close, after
systable_endscan.
> Now (1) and (2), I would have no hesitation in using it.
> I work with ERP, and throughout the time, the later, lock resources and release them soon, the better, for the
performanceof the system as a whole.
 
> Even if it doesn't make much difference locally, using this process, throughout the system, efficiency is
noticeable.
> Apparently, it is more code, but it is less resources used and for less time.
> And (2), if it is a case, frequently, no table would be blocked in this function.

Nobody here is going to question the concept that it's better to use
resources for less time rather than more, but the wisdom of sticking
to well-established coding patterns instead of inventing altogether
new ones is also well-understood. There are often good reasons why the
code is written in the way that it is, and it's important to
understand those before proposing to change things.

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



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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: Unify drop-by-OID functions
Следующее
От: Ranier Vilela
Дата:
Сообщение: Re: Unify drop-by-OID functions