by Bruce Momjian
- ALIGN=CENTER>
+
+
Click on any of the section headings to see the source code for that section.
- creates initial template database via initdb
special syntax used only by the bootstrap procedure.
- passes control to postmaster or postgres
control to the postmaster or postgres backend code.
- controls postgres server startup/termination
and the connection is passed to it.
- backend libpq library routines
This handles communication to the client processes.
- traffic cop, dispatches request to proper module
/commands functions.
- converts SQL query to query tree
Nodes to be handled by the optimizer and executor.
- creates path and plan
This uses the parser output to generate an optimal plan for the
executor.
-4>
+3>
- creates path from parser output
-4>
+3>
This takes the parser query output, and generates all possible methods of
executing the request.
and optimizer table statistics to evaluate each possible execution
method, and assigns a cost to each.
-4>
+3>
- genetic query optimizer
-4>
+3>
optimizer/path evaluates all possible ways to join the requested tables.
When the number of tables becomes great, the number of tests made
tables, it is faster.
There is an option to control when this feature is used.
-4>
+3>
- optimizes path output
-4>
+3>
This takes the optimizer/path output, chooses the path with the
least cost, and creates a plan for the executor.
-4>
+3>
- handle special plan cases
-4>
+3>
This does special plan processing.
-4>
+3>
- optimizer support routines
-4>
+3>
This contains support routines used by other parts of the optimizer.
- executes complex node plans from optimizer
and uniqueness.
- commands that do not require the executor
in the catalog directory to do the actual work.
- system catalog manipulation
that pre-format user requests into a predefined format.
- manages various storage systems
These allow uniform resource access by the backend.
- shared buffer pool manager
- file manager
- semaphores and shared memory
- large objects
- lock manager
- page manager
- storage/disk manager
- various data access methods
transactions.
- common access routines
- easy-to-define access method system
- hash
- heap is use to store data rows
- used by all index types
- Lehman and Yao's btree management algorithm
- used for indexing of 2-dimensional data
- transaction manager (BEGIN/ABORT/COMMIT)
- creation/manipulation of nodes and lists
store requests and data.
- support routines
-4>
+3>
- built-in data type routines
-4>
+3>
This contains all the PostgreSQL builtin data types.
-4>
+3>
- system/relation/function cache routines
-4>
+3>
PostgreSQL supports arbitrary data types, so no data types are hard-coded
into the core backend routines.
This last cache maintains information about all recently-accessed
tables, not just system ones.
-4>
+3>
- error reporting routines
-4>
+3>
Reports backend errors to the front end.
-4>
+3>
- function manager
-4>
+3>
This handles the calling of dynamically-loaded functions, and the calling
of functions defined in the system tables.
-4>
+3>
- hash routines for internal algorithms
-4>
+3>
These hash routines are used by the cache and memory-manager routines to
do quick lookups of dynamic data storage structures maintained by the
backend.
-4>
+3>
- various initialization stuff
-4>
-4>
+3>
+3>
- miscellaneous stuff
-4>
-4>
+3>
+3>
- memory manager(process-local memory)
-4>
+3>
When PostgreSQL allocates memory, it does so in an explicit context.
Contexts can be statement-specific, transaction-specific, or
By doing this, the backend can easily free memory once a statement or
transaction completes.
-4>
+3>
- sort routines for internal algorithms
-4>
+3>
When statement output must be sorted as part of a backend operation,
this code sorts the tuples, either in memory or using disk files.
-4>
+3>
- transaction time qualification routines
-4>
+3>
These routines do checking of tuple internal columns to determine if the
current row is still valid, or is part of a non-committed transaction or
superseded by a new row.
- include files
There are include directories for each subsystem.
- support library
This houses several generic routines.
- regular expression library
This is used for regular expression handling in the backend, i.e. '~'.
- rules system
This does processing for the rules system.
- unused (array handling?)
-
+
+
+