Skip site navigation (1) Skip section navigation (2)

Optional Oid

From: Manfred Koizar <mkoi-pg(at)aon(dot)at>
To: pgsql-patches(at)postgresql(dot)org
Subject: Optional Oid
Date: 2002-07-17 07:47:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Here is a preview of a patch which shall eventually further reduce
heap tuple header size by four bytes for tables created WITHOUT OIDS.

t_oid is eliminated from the start of struct HeapTupleHeader.  If an
oid is needed, it is added at the end of the struct (after the null
bitmap, if present).

Per Tom Lane's suggestion the information whether a tuple has an oid
or not is carried in the tuple descriptor.  For debugging reasons
tdhasoid is of type char, not bool.  There are predefined values for

This patch has been generated against a cvs snapshot from last week
and I don't expect it to apply cleanly to current sources.  While I
post it here for public review, I'm working on a new version against a
current snapshot.  (There's been heavy activity recently; hope to
catch up some day ...)

This is a long patch;  if it is too hard to swallow, I can provide it
in smaller pieces:

Part 1:  Accessor macros
Part 2:  tdhasoid in TupDesc
Part 3:  Regression test
Part 4:  Parameter withoid to heap_addheader
Part 5:  Eliminate t_oid from HeapTupleHeader

Part 2 is the most hairy part because of changes in the executor and
even in the parser;  the other parts are straightforward.

Up to part 4 the patched postmaster stays binary compatible to
databases created with an unpatched version.  Part 5 is small (100
lines) and finally breaks compatibility.

[Follow-up to -hackers?]



pgsql-patches by date

Next:From: Peter EisentrautDate: 2002-07-17 18:44:48
Subject: Re: several minor cleanups
Previous:From: Bruce MomjianDate: 2002-07-17 03:03:27
Subject: Re: utils C files

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group