Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Everything in PostgreSQL 8.3 is now in Greenplum. PostgreSQL 8.3 has been end-of-lifed in upstream, so there will be no new upstream minor releases of this series anymore either. This includes a lot of new features from PostgreSQL 8.3, and a ton of bug fixes. See upstream release notes for details. One big user-visible change included is the removal of implicit cast from other datatypes to text. When this was done in PostgreSQL, it caused a lot of sloppily written application queries to break. Which is a good thing in the long run, but it caused a lot of pain on upgrade. A few features work slightly differently in GPDB: * Lazy XIDs feature in upstream reduces XID consumption, by not assigning XIDs to read-only transactions. That optimization has not been implemented for GPDB distributed transactions, however, so practically all queries in GPDB still consume XIDs, whether they're read-only or not. * temp_tablespaces GUC was added in upstream, but it has been disabled in GPDB, in favor of GPDB-specific system to decide which filespace to use for temporary files. * B-tree indexes can now be used to answer "col IS NULL" queries. That support has not been implemented for bitmap indexes. * Support was added for "top N" sorting, speeding up queries with ORDER BY and LIMIT. That support was not implemented for tuplesort_mk.c, however, so you only get that benefit with enable_mk_sort=off. * Multi-worker autovacuum support was merged, but autovacuum as whole is still disabled in GPDB. * Planner hook was added. Nothing special there, but we should consider refactoring the ORCA glue code to use it. * Plan cache invalidation was added upstream, which made the gp_plpgsql_clear_cache_always option obsolete. We also backported the further invalidation improvements from 8.4. See below for more information. In addition to those, there were some big refactorings that were not that interesting from user point of view, but caused a lot of code churn: InitPlans are now initialized separately at executor startup, the executor range table was changed to be "flat", and code related to parse analysis of DDL commands was moved around. The way UPDATE WHERE CURRENT OF was implemented in GPDB was refactored to match the new upstream support for the same (see below for more information). Plan cache invalidation ----------------------- One notable feature included in this merge is the support for plan cache invalidation. GPDB contained a hack to invalidate all plans in master between transactions, for the same purpose, but the proper plan cache invalidation is a much better solution. However, because the GPDB hack also handled dropped/recreated functions in some cases, if we just leave it out and replace with the 8.3 plan cache invalidation, there will be a regression in those cases. To fix, this merge commit includes a backport the rest of the plan cache invalidation support from PostgreSQL 8.4, which handles functions and operators too. The upstream commit for that was: commit ee33b95 Author: Tom Lane <[email protected]> Date: Tue Sep 9 18:58:09 2008 +0000 Improve the plan cache invalidation mechanism to make it invalidate plans when user-defined functions used in a plan are modified. Also invalidate plans when schemas, operators, or operator classes are modified; but for these cases we just invalidate everything rather than tracking exact dependencies, since these types of objects seldom change in a production database. Tom Lane; loosely based on a patch by Martin Pihlak. As a result of that, the gp_plpgsql_clear_cache_always GUC is removed, as it's no longer needed. This also includes new test cases in the plpgsql cache regression test, to demonstrate the improvements. CURRENT OF code changes ----------------------- This merge includes the upstream support for UPDATE WHERE CURRENT OF. GPDB had support for that already, it's been refactored to use the upstream code as much as possible (execCurrentOf()). Now that we have the upstream code available, this also refactors the way current position of a cursor is dispatched. Instead of modifying every CurrentOfExpr node in the plan tree before dispatching it, store the current positions of each cursor mentioned in a CurrentOfExpr in a separate CursorPosInfo node, and dispatch those along with the query plan, in QueryDispatchDesc. This was a joint effort between me (Heikki) and Daniel Gustafsson.
- Loading branch information