WAL, xl_heap_insert and tuple oid mystry

Поиск
Список
Период
Сортировка
От jagan
Тема WAL, xl_heap_insert and tuple oid mystry
Дата
Msg-id 296081.50588.qm@web32108.mail.mud.yahoo.com
обсуждение исходный текст
Ответы Re: WAL, xl_heap_insert and tuple oid mystry  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Hi,
Suppose I create a table as follows:

CREATE TABLE test2 (name TEXT, age INTEGER) WITH oids;

Now, for every tuple in this table is associated with a unique oid, which I can retrieve by:

SELECT oid, name, age FROM test2;

which works great. So far so good.

Now, if look at the corresponding WAL entry for any insert into this relation, it creates the following WAL entry which
Ican decode. 

XLogRecord ---> Followed by --> xl_heap_insert struct -->followed by --> xl_heap_header --> Followed by --> tuple data

If I use the macro  HeapTupleHeaderGetOid([xl_heap_header struct]) or equivalently if I test ([xl_heap_header
struct]->t_infomask& HEAP_HASOID), it tells me that the tuple oid is not stored with this record. 

Where is the OID of tuple stored in a WAL record of a tuple? If not with xl_heap_header, where is it stored? Is it
storedat all? 

Thanks for any responses.  
Jagan



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Windows build issues
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Locking when concurrent updated of foreign references