From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | jagan <jaganrvce(at)yahoo(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: WAL, xl_heap_insert and tuple oid mystry |
Date: | 2011-04-12 16:49:33 |
Message-ID: | 4DA4829D.6050800@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12.04.2011 19:42, jagan wrote:
>>> 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
>>> stored at all?
>
> > It's stored in the "tuple data" portion.
>
> Is the OID also recorded with xl_heap_delete record as well or just the xl_heaptid? From my reading of the code it is not recorded.
Correct, it's not.
> In general, why is OID of a tuple relegated as just another tuple data, when it can replace xl_heaptid as a much more stable tuple identifier. I understand that by recording tuples in terms of xl_heaptid (i.e., page/offset) means that the db can recover quickly but isn't there some value to storing a much "higher level" information in the WAL logs? For example, tuple manipulations, if recorded in terms of manipulation on tuple oids, can support applications such as these:
>
> http://blogs.enterprisedb.com/2011/03/03/more-musings-on-logical-replication/
Possibly. On the other hand, another common complaint is that PostgreSQL
writes a lot of WAL, much more than other DBMSs. Adding more
higher-level information to WAL records would make that issue even
worse. At the moment we only include the minimum amount of information
needed for recovery.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-04-12 18:09:53 | Re: fn_collation in FmgrInfo considered harmful |
Previous Message | jagan | 2011-04-12 16:42:09 | Re: WAL, xl_heap_insert and tuple oid mystry |