Thread: Physical block structure in PostgreSQL

Physical block structure in PostgreSQL

From
"Spendius"
Date:
Hi,
I found no description of the way the records of a table are physically

stored in files with PostgreSQL. I said "block structure" in my subject

but actually is there any such thing as a block ?
(I read the pages
http://www.postgresql.org/docs/8.1/interactive/storage.html
and saw things regarding files and "pages" that are "usually 8k"-big
etc. but
saw no further info about "blocks" - they speak of "items" here: what
is it ?)

Thanks.
Spendius


Re: Physical block structure in PostgreSQL

From
ptjm@interlog.com (Patrick TJ McPhee)
Date:
In article <1152783428.682416.237320@p79g2000cwp.googlegroups.com>,
Spendius <spendius@muchomail.com> wrote:

% (I read the pages
% http://www.postgresql.org/docs/8.1/interactive/storage.html
% and saw things regarding files and "pages" that are "usually 8k"-big
% etc. but
% saw no further info about "blocks" - they speak of "items" here: what
% is it ?)

An item is the thing that's stored on the page. For instance, a database
table is stored in a bunch of pages in some file. Each row in the
table is stored as an item on a page, starting with a HeapTupleHeaderData.
The structure of an item for an index page might be different, though.

I found there was enough information in the section you cite to write a
simple data dumping tool in an emergency a while ago.
--

Patrick TJ McPhee
North York  Canada
ptjm@interlog.com