Re: Wrap access to Oid in HeapTupleHeader

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Wrap access to Oid in HeapTupleHeader
Дата
Msg-id 26228.1025718645@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Wrap access to Oid in HeapTupleHeader  (Manfred Koizar <mkoi-pg@aon.at>)
Ответы Re: Wrap access to Oid in HeapTupleHeader  (Manfred Koizar <mkoi-pg@aon.at>)
Список pgsql-patches
Manfred Koizar <mkoi-pg@aon.at> writes:
> Where should DEBUG_TUPLE_ACCESS be defined or undef'd?

It doesn't need to be anywhere, but you could add it to pg_config.h.in
near line 308, where there are other similar symbols, eg
    /* #define ACLDEBUG */

> As regards your complaint about the patch making oid access dependent
> on Relation, my POV is, that I did not introduce this dependence;
> currently whether a tuple header is supposed to contain a valid oid or
> not (apart from the fact, that it has a t_oid field anyway) *is*
> dependent on Relation-...->hasoids, we have nothing better to look at.

My point is that in the existing code, you can fetch t_oid and be sure
you will get 0 (and not either garbage or a crash) if no valid OID has
been assigned; this is relied on in several places that do not have
access to a Relation.  To do the same in your proposed change, those
places will need more knowledge.  They can't just blindly fetch from
tuple + t_hoff - sizeof(Oid).

            regards, tom lane



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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: Wrap access to Oid in HeapTupleHeader
Следующее
От: Manfred Koizar
Дата:
Сообщение: Re: Wrap access to Oid in HeapTupleHeader