Supported Versions: Current (16) / 15 / 14 / 13 / 12
Development Versions: devel
Unsupported versions: 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

VII. Internals

This part contains assorted information that can be of use to PostgreSQL developers.

Table of Contents
40. Overview of PostgreSQL Internals
40.1. The Path of a Query
40.2. How Connections are Established
40.3. The Parser Stage
40.4. The PostgreSQL Rule System
40.5. Planner/Optimizer
40.6. Executor
41. System Catalogs
41.1. Overview
41.2. pg_aggregate
41.3. pg_am
41.4. pg_amop
41.5. pg_amproc
41.6. pg_attrdef
41.7. pg_attribute
41.8. pg_cast
41.9. pg_class
41.10. pg_constraint
41.11. pg_conversion
41.12. pg_database
41.13. pg_depend
41.14. pg_description
41.15. pg_group
41.16. pg_index
41.17. pg_inherits
41.18. pg_language
41.19. pg_largeobject
41.20. pg_listener
41.21. pg_namespace
41.22. pg_opclass
41.23. pg_operator
41.24. pg_proc
41.25. pg_rewrite
41.26. pg_shadow
41.27. pg_statistic
41.28. pg_tablespace
41.29. pg_trigger
41.30. pg_type
41.31. System Views
41.32. pg_indexes
41.33. pg_locks
41.34. pg_rules
41.35. pg_settings
41.36. pg_stats
41.37. pg_tables
41.38. pg_user
41.39. pg_views
42. Frontend/Backend Protocol
42.1. Overview
42.2. Message Flow
42.3. Message Data Types
42.4. Message Formats
42.5. Error and Notice Message Fields
42.6. Summary of Changes since Protocol 2.0
43. PostgreSQL Coding Conventions
43.1. Formatting
43.2. Reporting Errors Within the Server
43.3. Error Message Style Guide
44. Native Language Support
44.1. For the Translator
44.2. For the Programmer
45. Writing A Procedural Language Handler
46. Genetic Query Optimizer
46.1. Query Handling as a Complex Optimization Problem
46.2. Genetic Algorithms
46.3. Genetic Query Optimization (GEQO) in PostgreSQL
46.4. Further Reading
47. Index Cost Estimation Functions
48. GiST Indexes
48.1. Introduction
48.2. Extensibility
48.3. Implementation
48.4. Limitations
48.5. Examples
49. Database Physical Storage
49.1. Database File Layout
49.2. TOAST
49.3. Database Page Layout
50. BKI Backend Interface
50.1. BKI File Format
50.2. BKI Commands
50.3. Example