Question about resource owners

Поиск
Список
Период
Сортировка
От pgsql@j-davis.com
Тема Question about resource owners
Дата
Msg-id 2dbf65d9c7464b0e06a0caa84d60bef5efaa56f4.camel@j-davis.com
обсуждение исходный текст
Список pgsql-hackers
The way we handle resource owners seems a bit inconsistent.

* Transactions always have a resource owner (hierarchical for
subtransactions).

* Portals have resource owners where the parent is the transaction's
resource owner.

* Some auxiliary processes have one, but if that process were to
start/end transactions, it would clobber CurrentResourceOwner and it
would just be left with AuxProcessResourceOwner.

* It doesn't seem like a custom background worker process can make use
of resource owners in all cases, because the cleanup after sigsetjmp
doesn't release them unless it's attached to shared memory (which might
ordinarily be the case, but I don't know why we'd assume that).

Why don't we just use a hierarchy of resource owners, so that there's
always a TopResourceOwner and a non-NULL CurrentResourceOwner in every
process? If we don't expect some particular process to hold resources
there, we can emit a WARNING.

Regards,
    Jeff Davis




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Requesting advanced Group By support
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: file cloning in pg_upgrade and CREATE DATABASE