- 08 10月, 2019 1 次提交
-
-
由 Heikki Linnakangas 提交于
I found the logic to decide the target locus hard to understand, so I rewrote it in a table-driven approach. I hope it's not just me. Fixes github issue https://github.com/greenplum-db/gpdb/issues/8711Reviewed-by: NZhenghua Lyu <zlv@pivotal.io>
-
- 14 3月, 2019 1 次提交
-
-
由 Daniel Gustafsson 提交于
As we merge with upstream and by that keep refining the Postgres planner, legacy planner is no longer a suitable name. This changes all variations of the spelling (legacy planner, legacy optimizer, legacy query optimizer etc) to say "Postgres" rather than "legacy". Reviewed-by: NVenkatesh Raghavan <vraghavan@pivotal.io> Reviewed-by: NDavid Yozie <dyozie@pivotal.io> Reviewed-by: NGeorgios Kokolatos <gkokolatos@pivotal.io>
-
- 11 1月, 2019 1 次提交
-
-
由 Heikki Linnakangas 提交于
* Add missing planstate_walker() support for it * Set memory account id correctly While we're at it, change the assertion in GetMotionState() into an elog. If we hit bugs like this in the future, better to handle it gracefully than crash the whole server. Fixes https://github.com/greenplum-db/gpdb/issues/6668Reviewed-by: NNing Yu <nyu@pivotal.io>
-
- 13 12月, 2018 1 次提交
-
-
由 Daniel Gustafsson 提交于
The Greenplum specific error handling via ereport()/elog() calls was in need of a unification effort as some parts of the code was using a different messaging style to others (and to upstream). This aims at bringing many of the GPDB error calls in line with the upstream error message writing guidelines and thus make the user experience of Greenplum more consistent. The main contributions of this patch are: * errmsg() messages shall start with a lowercase letter, and not end with a period. errhint() and errdetail() shall be complete sentences starting with capital letter and ending with a period. This attempts to fix this on as many ereport() calls as possible, with too detailed errmsg() content broken up into details and hints where possible. * Reindent ereport() calls to be more consistent with the common style used in upstream and most parts of Greenplum: ereport(ERROR, (errcode(<CODE>), errmsg("short message describing error"), errhint("Longer message as a complete sentence."))); * Avoid breaking messages due to long lines since it makes grepping for error messages harder when debugging. This is also the de facto standard in upstream code. * Convert a few internal error ereport() calls to elog(). There are no doubt more that can be converted, but the low hanging fruit has been dealt with. Also convert a few elog() calls which are user facing to ereport(). * Update the testfiles to match the new messages. Spelling and wording is mostly left for a follow-up commit, as this was getting big enough as it was. The most obvious cases have been handled but there is work left to be done here. Discussion: https://github.com/greenplum-db/gpdb/pull/6378Reviewed-by: NAshwin Agrawal <aagrawal@pivotal.io> Reviewed-by: NHeikki Linnakangas <hlinnakangas@pivotal.io>
-
- 19 9月, 2018 1 次提交
-
-
由 Heikki Linnakangas 提交于
When building a Sort node to represent the ordering that is preserved by a Motion node, in make_motion(), the call to make_sort_from_pathkeys() would sometimes fail with "could not find pathkey item to sort". This happened when the ordering was over a UNION ALL operation. When building Motion nodes for MergeAppend subpaths, the path keys that represented the ordering referred to the items in the append rel's target list, not the subpaths. In create_merge_append_plan(), where we do a similar thing for each subpath, we correctly passed the 'relids' argument to prepare_sort_from_pathkeys(), so that prepare_sort_from_pathkeys() can match the target list entries of the append relation with the entries of the subpaths. But when creating the Motion nodes for each subpath, we were passing NULL as 'relids' (via make_sort_from_pathkeys()). At a high level, the fix is straightforward: we need to pass the correct 'relids' argument to prepare_sort_from_pathkeys(), in cdbpathtoplan_create_motion_plan(). However, the current code structure makes that not so straightforward, so this required some refactoring of the make_motion() and related functions: Previously, make_motion() and make_sorted_union_motion() would take a path key list as argument, to represent the ordering, and it called make_sort_from_pathkeys() to extract the sort columns, operators etc. After this patch, those functions take arrays of sort columns, operators, etc. directly as arguments, and the caller is expected to do the call to make_sort_from_pathkeys() to get them, or build them through some other means. In cdbpathtoplan_create_motion_plan(), call prepare_sort_from_pathkeys() directly, rather than the make_sort_from_pathkeys() wrapper, so that we can pass the 'relids' argument. Because prepare_sort_from_pathkeys() is marked as 'static', move cdbpathtoplan_create_motion_plan() from cdbpathtoplan.c to createplan.c, so that it can call it. Add test case. It's a slightly reduced version of a query that we already had in 'olap_group' test, but seems better to be explicit. Revert the change in expected output of 'olap_group', made in commit 28087f4e, which memorized the error in the expected output. Fixes https://github.com/greenplum-db/gpdb/issues/5695. Reviewed-by: NPengzhou Tang <ptang@pivotal.io> Reviewed-by: NMelanie Plageman <mplageman@pivotal.io>
-
- 03 8月, 2018 1 次提交
-
-
由 Karen Huddleston 提交于
This reverts commit 4750e1b6.
-
- 02 8月, 2018 1 次提交
-
-
由 Richard Guo 提交于
This is the final batch of commits from PostgreSQL 9.2 development, up to the point where the REL9_2_STABLE branch was created, and 9.3 development started on the PostgreSQL master branch. Notable upstream changes: * Index-only scan was included in the batch of upstream commits. It allows queries to retrieve data only from indexes, avoiding heap access. * Group commit was added to work effectively under heavy load. Previously, batching of commits became ineffective as the write workload increased, because of internal lock contention. * A new fast-path lock mechanism was added to reduce the overhead of taking and releasing certain types of locks which are taken and released very frequently but rarely conflict. * The new "parameterized path" mechanism was added. It allows inner index scans to use values from relations that are more than one join level up from the scan. This can greatly improve performance in situations where semantic restrictions (such as outer joins) limit the allowed join orderings. * SP-GiST (Space-Partitioned GiST) index access method was added to support unbalanced partitioned search structures. For suitable problems, SP-GiST can be faster than GiST in both index build time and search time. * Checkpoints now are performed by a dedicated background process. Formerly the background writer did both dirty-page writing and checkpointing. Separating this into two processes allows each goal to be accomplished more predictably. * Custom plan was supported for specific parameter values even when using prepared statements. * API for FDW was improved to provide multiple access "paths" for their tables, allowing more flexibility in join planning. * Security_barrier option was added for views to prevents optimizations that might allow view-protected data to be exposed to users. * Range data type was added to store a lower and upper bound belonging to its base data type. * CTAS (CREATE TABLE AS/SELECT INTO) is now treated as utility statement. The SELECT query is planned during the execution of the utility. To conform to this change, GPDB executes the utility statement only on QD and dispatches the plan of the SELECT query to QEs. Co-authored-by: NAdam Lee <ali@pivotal.io> Co-authored-by: NAlexandra Wang <lewang@pivotal.io> Co-authored-by: NAshwin Agrawal <aagrawal@pivotal.io> Co-authored-by: NAsim R P <apraveen@pivotal.io> Co-authored-by: NDaniel Gustafsson <dgustafsson@pivotal.io> Co-authored-by: NGang Xiong <gxiong@pivotal.io> Co-authored-by: NHaozhou Wang <hawang@pivotal.io> Co-authored-by: NHeikki Linnakangas <hlinnakangas@pivotal.io> Co-authored-by: NJesse Zhang <sbjesse@gmail.com> Co-authored-by: NJinbao Chen <jinchen@pivotal.io> Co-authored-by: NJoao Pereira <jdealmeidapereira@pivotal.io> Co-authored-by: NMelanie Plageman <mplageman@pivotal.io> Co-authored-by: NPaul Guo <paulguo@gmail.com> Co-authored-by: NRichard Guo <guofenglinux@gmail.com> Co-authored-by: NShujie Zhang <shzhang@pivotal.io> Co-authored-by: NTaylor Vesely <tvesely@pivotal.io> Co-authored-by: NZhenghua Lyu <zlv@pivotal.io>
-
- 23 7月, 2018 1 次提交
-
-
由 Zhenghua Lyu 提交于
Before, we cannot update distribution column in legacy planner, because the OLD tuple and NEW tuple maybe belong to different segments. We enable this by borrowing ORCA's logic, namely, split each update operation into delete and insert. The delete operation is hashed by OLD tuple attributes, and insert operation is hashed by NEW tuple attributes. This change includes following items: * We need push missed OLD attributes to sub plan tree so that that attribute could be passed to top Motion. * In addition, if the result relation has oids, we also need to put oid in the targetlist. * If result relation is partitioned, we should special treat it because resultRelations is partition tables instead of root table, but that is true for normal Insert. * Special treats for update triggers, because trigger cannot be executed across segments. * Special treatment in nodeModifyTable, so that it can process Insert/Delete for update purpose. * Proper initialization of SplitUpdate. There are still TODOs: * We don't handle cost gracefully, because we add SplitUpdate node after plan generated. Already added a FIXME for this * For deletion, we could optimize in just sending distribution columns instead of all columns Author: Xiaoran Wang <xiwang@pivotal.io> Author: Max Yang <myang@pivotal.io> Author: Shujie Zhang <shzhang@pivotal.io> Author: Zhenghua Lyu <zlv@pivotal.io>
-
- 23 10月, 2017 1 次提交
-
-
由 Heikki Linnakangas 提交于
This allows removing many alternative expected output files for ORCA. The flag was added to ORCA in v2.48.0, so bump our dependency to that version.
-
- 02 3月, 2017 1 次提交
-
-
由 Heikki Linnakangas 提交于
All of these tests used the same test table, but it was dropped and re-created for each test. To speed things up, create it once, and wrap each test in a begin-rollback block. The access plan of one of the tests varied depending on optimizer_segments, and it caused a difference in the ERROR message. The TINC tests were always run with 2 segments, but you got a different plan and message with 3 or more segments. Added a "SET optimizer_segments=2" to stabilize that, and a comment explaining the situation.
-