Rip out QueryTreeList structure, root and branch. Querytree
Tom Lane <tgl@sss.pgh.pa.us>
Rip out QueryTreeList structure, root and branch. Querytree lists are now plain old garden-variety Lists, allocated with palloc, rather than specialized expansible-array data allocated with malloc. This substantially simplifies their handling and eliminates several sources of memory leakage. Several basic types of erroneous queries (syntax error, attempt to insert a duplicate key into a unique index) now demonstrably leak zero bytes per query.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/arch-dev.sgml | modified | +4 −5 |
| src/backend/catalog/heap.c | modified | +11 −9 |
| src/backend/catalog/pg_proc.c | modified | +2 −2 |
| src/backend/executor/functions.c | modified | +10 −13 |
| src/backend/executor/spi.c | modified | +31 −47 |
| src/backend/optimizer/plan/planner.c | modified | +3 −3 |
| src/backend/parser/analyze.c | modified | +16 −31 |
| src/backend/parser/parse_clause.c | modified | +8 −7 |
| src/backend/parser/parse_expr.c | modified | +10 −7 |
| src/backend/parser/parser.c | modified | +11 −13 |
| src/backend/rewrite/rewriteHandler.c | modified | +18 −18 |
| src/backend/tcop/postgres.c | modified | +55 −114 |
| src/include/executor/spi_priv.h | modified | +3 −3 |
| src/include/optimizer/planner.h | modified | +2 −2 |
| src/include/parser/analyze.h | modified | +2 −2 |
| src/include/parser/parse_node.h | modified | +1 −7 |
| src/include/parser/parser.h | modified | +2 −2 |
| src/include/tcop/tcopprot.h | modified | +3 −3 |