1_Postgres_introduction_class_1
1_Postgres_introduction_class_1
Introduction to PostgreSQL
Module Objective:
• What is PostgreSQL?
• PostgreSQL Naming Conventions
• PostgreSQL Limits
• Page Layout
What is PostgreSQL?
Partition keys 32
What is Page?
• Page is a smallest unit of data storage.
• Every table and index is stored as an array of pages of fixed size.
• By Default, In PostgreSQL the page size is 8kb.
• We can configure different page size during compiling the server
• All pages are logically equivalent and any row can be stored in any
page.
PostgreSQL Page Layout
Page Layout
ItemIdDat ItemIdDat
Page Header
a a
8k
Free b
Space
Tuple Tuple Special
Overall Page layout
Items Description
PageHeader Data 24 Bytes Long. Contains General
Information about the page, including
free space pointers
ItemIdData Array of pairs pointing to the actual
items. 4 Bytes per item.
Free Space The unallocated space, New item
Pointers are allocated from the start of
this area, New items from the end.
Tuple The actual item themselves.
Special Space Index access method specific data.
Different methods store different data.
Empty is ordinary tables.
Thank you.