Re: including backend ID in relpath of temp rels - updated patch

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: including backend ID in relpath of temp rels - updated patch
Дата
Msg-id AANLkTimMWDqZ+5vyr5hbA+JeZLEdtB9f8OAVh1M1h6Z3@mail.gmail.com
обсуждение исходный текст
Ответ на Re: including backend ID in relpath of temp rels - updated patch  (Jaime Casanova <jaime@2ndquadrant.com>)
Ответы Re: including backend ID in relpath of temp rels - updated patch  (Jaime Casanova <jaime@2ndquadrant.com>)
Список pgsql-hackers
On Sun, Jul 25, 2010 at 2:37 AM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> but i have a few questions, maybe is right what you did i only want to
> understand it:
> - you added this in include/storage/smgr.h, so why is safe to assume
> that if the backend != InvalidBackendId it must be a temp relation?
>
> +#define SmgrIsTemp(smgr) \
> +   ((smgr)->smgr_rnode.backend != InvalidBackendId)

That's pretty much the whole point of the patch.  Instead of
identifying relations as simply "temporary" or "not temporary", we
identify as "a temporary relation owned by backend X" or as "not
temporary".

> - you added a question like this "if (rel->rd_backend == MyBackendId)"
> in a few places... why are you assuming that? that couldn't be a new
> created relation (in current session of course)? is that safe?

Again, rd_backend is not the creating backend ID unless the relation
is a temprel.

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


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: review: psql: edit function, show function commands patch
Следующее
От: Robert Haas
Дата:
Сообщение: Re: non-overlapping, consecutive partitions