]> begriffs open source - ai-pg/blob - full-docs/txt/internals.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / internals.txt
1
2 Part VII. Internals
3
4    This part contains assorted information that might be of use to
5    PostgreSQL developers.
6
7    Table of Contents
8
9    51. Overview of PostgreSQL Internals
10
11         51.1. The Path of a Query
12         51.2. How Connections Are Established
13         51.3. The Parser Stage
14         51.4. The PostgreSQL Rule System
15         51.5. Planner/Optimizer
16         51.6. Executor
17
18    52. System Catalogs
19
20         52.1. Overview
21         52.2. pg_aggregate
22         52.3. pg_am
23         52.4. pg_amop
24         52.5. pg_amproc
25         52.6. pg_attrdef
26         52.7. pg_attribute
27         52.8. pg_authid
28         52.9. pg_auth_members
29         52.10. pg_cast
30         52.11. pg_class
31         52.12. pg_collation
32         52.13. pg_constraint
33         52.14. pg_conversion
34         52.15. pg_database
35         52.16. pg_db_role_setting
36         52.17. pg_default_acl
37         52.18. pg_depend
38         52.19. pg_description
39         52.20. pg_enum
40         52.21. pg_event_trigger
41         52.22. pg_extension
42         52.23. pg_foreign_data_wrapper
43         52.24. pg_foreign_server
44         52.25. pg_foreign_table
45         52.26. pg_index
46         52.27. pg_inherits
47         52.28. pg_init_privs
48         52.29. pg_language
49         52.30. pg_largeobject
50         52.31. pg_largeobject_metadata
51         52.32. pg_namespace
52         52.33. pg_opclass
53         52.34. pg_operator
54         52.35. pg_opfamily
55         52.36. pg_parameter_acl
56         52.37. pg_partitioned_table
57         52.38. pg_policy
58         52.39. pg_proc
59         52.40. pg_publication
60         52.41. pg_publication_namespace
61         52.42. pg_publication_rel
62         52.43. pg_range
63         52.44. pg_replication_origin
64         52.45. pg_rewrite
65         52.46. pg_seclabel
66         52.47. pg_sequence
67         52.48. pg_shdepend
68         52.49. pg_shdescription
69         52.50. pg_shseclabel
70         52.51. pg_statistic
71         52.52. pg_statistic_ext
72         52.53. pg_statistic_ext_data
73         52.54. pg_subscription
74         52.55. pg_subscription_rel
75         52.56. pg_tablespace
76         52.57. pg_transform
77         52.58. pg_trigger
78         52.59. pg_ts_config
79         52.60. pg_ts_config_map
80         52.61. pg_ts_dict
81         52.62. pg_ts_parser
82         52.63. pg_ts_template
83         52.64. pg_type
84         52.65. pg_user_mapping
85
86    53. System Views
87
88         53.1. Overview
89         53.2. pg_aios
90         53.3. pg_available_extensions
91         53.4. pg_available_extension_versions
92         53.5. pg_backend_memory_contexts
93         53.6. pg_config
94         53.7. pg_cursors
95         53.8. pg_file_settings
96         53.9. pg_group
97         53.10. pg_hba_file_rules
98         53.11. pg_ident_file_mappings
99         53.12. pg_indexes
100         53.13. pg_locks
101         53.14. pg_matviews
102         53.15. pg_policies
103         53.16. pg_prepared_statements
104         53.17. pg_prepared_xacts
105         53.18. pg_publication_tables
106         53.19. pg_replication_origin_status
107         53.20. pg_replication_slots
108         53.21. pg_roles
109         53.22. pg_rules
110         53.23. pg_seclabels
111         53.24. pg_sequences
112         53.25. pg_settings
113         53.26. pg_shadow
114         53.27. pg_shmem_allocations
115         53.28. pg_shmem_allocations_numa
116         53.29. pg_stats
117         53.30. pg_stats_ext
118         53.31. pg_stats_ext_exprs
119         53.32. pg_tables
120         53.33. pg_timezone_abbrevs
121         53.34. pg_timezone_names
122         53.35. pg_user
123         53.36. pg_user_mappings
124         53.37. pg_views
125         53.38. pg_wait_events
126
127    54. Frontend/Backend Protocol
128
129         54.1. Overview
130         54.2. Message Flow
131         54.3. SASL Authentication
132         54.4. Streaming Replication Protocol
133         54.5. Logical Streaming Replication Protocol
134         54.6. Message Data Types
135         54.7. Message Formats
136         54.8. Error and Notice Message Fields
137         54.9. Logical Replication Message Formats
138         54.10. Summary of Changes since Protocol 2.0
139
140    55. PostgreSQL Coding Conventions
141
142         55.1. Formatting
143         55.2. Reporting Errors Within the Server
144         55.3. Error Message Style Guide
145         55.4. Miscellaneous Coding Conventions
146
147    56. Native Language Support
148
149         56.1. For the Translator
150         56.2. For the Programmer
151
152    57. Writing a Procedural Language Handler
153    58. Writing a Foreign Data Wrapper
154
155         58.1. Foreign Data Wrapper Functions
156         58.2. Foreign Data Wrapper Callback Routines
157         58.3. Foreign Data Wrapper Helper Functions
158         58.4. Foreign Data Wrapper Query Planning
159         58.5. Row Locking in Foreign Data Wrappers
160
161    59. Writing a Table Sampling Method
162
163         59.1. Sampling Method Support Functions
164
165    60. Writing a Custom Scan Provider
166
167         60.1. Creating Custom Scan Paths
168         60.2. Creating Custom Scan Plans
169         60.3. Executing Custom Scans
170
171    61. Genetic Query Optimizer
172
173         61.1. Query Handling as a Complex Optimization Problem
174         61.2. Genetic Algorithms
175         61.3. Genetic Query Optimization (GEQO) in PostgreSQL
176         61.4. Further Reading
177
178    62. Table Access Method Interface Definition
179    63. Index Access Method Interface Definition
180
181         63.1. Basic API Structure for Indexes
182         63.2. Index Access Method Functions
183         63.3. Index Scanning
184         63.4. Index Locking Considerations
185         63.5. Index Uniqueness Checks
186         63.6. Index Cost Estimation Functions
187
188    64. Write Ahead Logging for Extensions
189
190         64.1. Generic WAL Records
191         64.2. Custom WAL Resource Managers
192
193    65. Built-in Index Access Methods
194
195         65.1. B-Tree Indexes
196         65.2. GiST Indexes
197         65.3. SP-GiST Indexes
198         65.4. GIN Indexes
199         65.5. BRIN Indexes
200         65.6. Hash Indexes
201
202    66. Database Physical Storage
203
204         66.1. Database File Layout
205         66.2. TOAST
206         66.3. Free Space Map
207         66.4. Visibility Map
208         66.5. The Initialization Fork
209         66.6. Database Page Layout
210         66.7. Heap-Only Tuples (HOT)
211
212    67. Transaction Processing
213
214         67.1. Transactions and Identifiers
215         67.2. Transactions and Locking
216         67.3. Subtransactions
217         67.4. Two-Phase Transactions
218
219    68. System Catalog Declarations and Initial Contents
220
221         68.1. System Catalog Declaration Rules
222         68.2. System Catalog Initial Data
223         68.3. BKI File Format
224         68.4. BKI Commands
225         68.5. Structure of the Bootstrap BKI File
226         68.6. BKI Example
227
228    69. How the Planner Uses Statistics
229
230         69.1. Row Estimation Examples
231         69.2. Multivariate Statistics Examples
232         69.3. Planner Statistics and Security
233
234    70. Backup Manifest Format
235
236         70.1. Backup Manifest Top-level Object
237         70.2. Backup Manifest File Object
238         70.3. Backup Manifest WAL Range Object