by Bruce Momjian
-
bootstrap - creates initial template database via initdb
+- creates initial template database via initdb
Because PostgreSQL requires access to system tables for almost every
special syntax used only by the bootstrap procedure.
-
main - passes control to postmaster or postgres
+- passes control to postmaster or postgres
This checks the process name(argv[0]) and various flags, and passes
control to the postmaster or postgres backend code.
-
postmaster - controls postgres server startup/termination
+- controls postgres server startup/termination
This creates shared memory, and then goes into a loop waiting for
and the connection is passed to it.
-
libpq - backend libpq library routines
+- backend libpq library routines
This handles communication to the client processes.
-
tcop - traffic cop, dispatches request to proper module
+- traffic cop, dispatches request to proper module
This contains the postgres backend main handler, as well as the
/commands functions.
-
parser - converts SQL query to query tree
+- converts SQL query to query tree
This converts SQL queries coming from libpq into command-specific
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.
+- creates path from parser output
This takes the parser query output, and generates all possible methods of
method, and assigns a cost to each.
+- genetic query optimizer
optimizer/path evaluates all possible ways to join the requested tables.
There is an option to control when this feature is used.
+- optimizes path output
This takes the optimizer/path output, chooses the path with the
least cost, and creates a plan for the executor.
+- handle special plan cases
This does special plan processing.
+- optimizer support routines
This contains support routines used by other parts of the optimizer.
-
executor - executes complex node plans from optimizer
+- executes complex node plans from optimizer
This handles select, insert, update, and delete statements.
and uniqueness.
-
commands - commands that do not require the executor
+- commands that do not require the executor
These process SQL commands that do not require complex handling.
in the catalog directory to do the actual work.
-
catalog - system catalog manipulation
+- system catalog manipulation
This contains functions that manipulate the system tables or catalogs.
that pre-format user requests into a predefined format.
-
storage - manages various storage systems
+- 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
-
access - various data access methods
+- various data access methods
These control the way data is accessed in heap, indexes, and
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)
-
nodes - creation/manipulation of nodes and lists
+- creation/manipulation of nodes and lists
PostgreSQL stores information about SQL queries in structures called
store requests and data.
-
utils - support routines
+- support routines
+- built-in data type routines
This contains all the PostgreSQL builtin data types.
+- system/relation/function cache routines
PostgreSQL supports arbitrary data types, so no data types are hard-coded
tables, not just system ones.
+- error reporting routines
Reports backend errors to the front end.
+- function manager
This handles the calling of dynamically-loaded functions, and the calling
of functions defined in the system tables.
-
utils/hash - hash routines for internal algorithms
+- hash routines for internal algorithms
These hash routines are used by the cache and memory-manager routines to
backend.
+- various initialization stuff
+- miscellaneous stuff
-
utils/mmgr - memory manager(process-local memory)
+- memory manager(process-local memory)
When PostgreSQL allocates memory, it does so in an explicit context.
transaction completes.
-
utils/sort - sort routines for internal algorithms
+- sort routines for internal algorithms
When statement output must be sorted as part of a backend operation,
this code sorts the tuples, either in memory or using disk files.
-
utils/time - transaction time qualification routines
+- transaction time qualification routines
These routines do checking of tuple internal columns to determine if the
superseded by a new row.
+- include files
There are include directories for each subsystem.
+- support library
This houses several generic routines.
-
regex - regular expression library
+- regular expression library
This is used for regular expression handling in the backend, i.e. '~'.
+- rules system
This does processing for the rules system.
-
tioga - unused (array handling?)
+- unused (array handling?)
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
5700 2400 9600 3000
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 2700 5100 2700 4500 300 4500 300 5100 2700 5100
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 0 0 1.00 60.00 120.00
- 5700 3600 1500 4500
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 2700 6300 2700 5700 300 5700 300 6300 2700 6300
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
- 0 0 1.00 60.00 120.00
- 1500 5100 1500 5700
2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
6900 5100 6900 4500 4500 4500 4500 5100 6900 5100
-2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 6
- 0 0 1.00 60.00 120.00
- 1500 6300 1500 6600 3900 6600 3900 4200 5700 4200 5700 4500
2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
6900 6300 6900 5700 4500 5700 4500 6300 6900 6300
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
5700 7500 5700 8100
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 6900 9600 6900 9000 4500 9000 4500 9600 6900 9600
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
- 5700 8700 5700 9000
+ 5700 8700 5700 9300
2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
10800 6300 10800 5700 8400 5700 8400 6300 10800 6300
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
0 0 1.00 60.00 120.00
6900 6000 8400 6000
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 2700 7500 2700 6900 300 6900 300 7500 2700 7500
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 2700 8400 2700 7800 300 7800 300 8400 2700 8400
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 3
0 0 1.00 60.00 120.00
- 4500 9300 3900 9300 3900 6600
+ 4500 9600 3900 9600 3900 6600
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 4
0 0 1.00 60.00 120.00
10800 6000 11400 6000 11400 4200 5700 4200
-2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
- 2700 9300 2700 8700 300 8700 300 9300 2700 9300
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 1
2700 8100
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 1
+ 8475 2175
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 0 0 1
+ 8475 2175
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 0 0 1.00 60.00 120.00
+ 3900 6600 3900 4200
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 0 0 1.00 60.00 120.00
+ 3900 4200 5700 4200
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 0 0 1.00 60.00 120.00
+ 5700 4200 5700 4500
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2700 9600 2700 9000 300 9000 300 9600 2700 9600
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0 1.00 60.00 120.00
0 0 1.00 60.00 120.00
- 2700 7200 3300 7200
+ 2700 9300 3300 9300
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2700 8700 2700 8100 300 8100 300 8700 2700 8700
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 1 2
+ 0 0 1.00 60.00 120.00
+ 0 0 1.00 60.00 120.00
+ 2700 8400 3300 8400
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2700 7800 2700 7200 300 7200 300 7800 2700 7800
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 1 2
+ 0 0 1.00 60.00 120.00
+ 0 0 1.00 60.00 120.00
+ 3300 7500 2700 7500
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2700 6900 2700 6300 300 6300 300 6900 2700 6900
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 1 2
+ 0 0 1.00 60.00 120.00
+ 0 0 1.00 60.00 120.00
+ 3300 6600 2700 6600
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2700 6000 2700 5400 300 5400 300 6000 2700 6000
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 1 2
+ 0 0 1.00 60.00 120.00
+ 0 0 1.00 60.00 120.00
+ 2700 5700 3300 5700
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 6900 9900 6900 9300 4500 9300 4500 9900 6900 9900
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 8 0 0 5
+ 10800 1200 10800 600 8400 600 8400 1200 10800 1200
+2 4 0 1 -1 7 0 0 -1 0.000 0 0 7 0 0 5
+ 10800 2400 10800 1800 8400 1800 8400 2400 10800 2400
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0 1.00 60.00 120.00
0 0 1.00 60.00 120.00
- 2700 8100 3300 8100
+ 8400 2100 7725 2100
2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 1 2
0 0 1.00 60.00 120.00
0 0 1.00 60.00 120.00
- 2700 9000 3300 9000
+ 8325 2175 7725 2550
+2 1 0 1 -1 7 0 0 -1 0.000 0 0 -1 1 0 2
+ 0 0 1.00 60.00 120.00
+ 5700 3600 5700 4200
4 1 -1 0 0 28 18 0.0000 4 195 630 5670 990 Main\001
4 1 -1 0 0 28 18 0.0000 4 195 1470 5685 2190 Postmaster\001
4 1 -1 0 0 28 18 0.0000 4 240 1110 9585 3375 Postgres\001
4 1 -1 0 0 28 18 0.0000 4 240 1110 5700 3390 Postgres\001
-4 1 -1 0 0 28 18 0.0000 4 195 1710 1500 4905 Initialization\001
-4 1 -1 0 0 28 18 0.0000 4 195 1215 1470 5940 Attach to\001
-4 1 -1 0 0 28 18 0.0000 4 195 2340 1485 6270 Shared Resources\001
4 1 -1 0 0 28 18 0.0000 4 240 915 9600 5970 Simple\001
4 1 -1 0 0 28 18 0.0000 4 195 1980 5685 7455 Generate Paths\001
4 1 -1 0 0 28 18 0.0000 4 195 1275 5715 7170 Rewrite &\001
4 1 -1 0 0 28 18 0.0000 4 255 1500 5715 6090 Traffic Cop\001
4 1 -1 0 0 28 18 0.0000 4 195 825 5685 4875 Parser\001
-4 1 -1 0 0 28 18 0.0000 4 195 1140 5685 9420 Executor\001
-4 1 -1 0 0 28 18 0.0000 4 195 2100 1485 7305 Access Methods\001
-4 1 -1 0 0 28 18 0.0000 4 195 1050 1485 9090 Utilities\001
-4 1 -1 0 0 28 18 0.0000 4 240 2325 1515 8190 Storage Managers\001
4 1 -1 0 0 28 18 0.0000 4 195 1485 9600 6255 Commands\001
4 1 -1 0 0 28 18 0.0000 4 195 1830 5715 8670 Generate Plan\001
4 1 -1 0 0 28 18 0.0000 4 195 1890 5700 8400 Choose Path &\001
4 0 -1 0 0 0 24 0.0000 4 330 1290 600 1470 Program\001
4 0 -1 0 0 0 24 0.0000 4 255 735 600 1890 Flow\001
4 0 -1 0 0 0 24 0.0000 4 330 1800 600 1050 PostgreSQL\001
+4 0 -1 0 0 0 18 0.0000 4 255 1095 9000 975 Bootstrap\001
+4 1 -1 0 0 28 18 0.0000 4 240 2325 1515 9390 Storage Managers\001
+4 0 -1 0 0 0 18 0.0000 4 225 1425 750 8475 Nodes / Lists\001
+4 1 -1 0 0 28 18 0.0000 4 195 1050 1485 7590 Utilities\001
+4 1 -1 0 0 28 18 0.0000 4 195 2100 1485 5805 Access Methods\001
+4 1 -1 0 0 28 18 0.0000 4 195 1140 5685 9720 Executor\001
+4 0 -1 0 0 0 18 0.0000 4 255 645 9225 2175 Libpq\001
+4 0 -1 0 0 0 18 0.0000 4 255 840 1050 6675 Catalog\001