ADBDEV-290 revert PR and Cherry pick commit from Pivotal's 5X_STABLE branch#45
Merged
ADBDEV-290 revert PR and Cherry pick commit from Pivotal's 5X_STABLE branch#45
Conversation
This reverts commit 04e2c51.
in gp_distribution_policy relation for inherited tables in GP5X
(GP6X is ok).
Query planes with GPORCA caused segmentation fault because of
out of range column numbers and postgres optimizer simply
returned error before current patch. For example:
create table ta (a int) distributed randomly;
create table tb (a int, b int) inherits (ta) distributed by (b);
set optimizer=on;
insert into tb values(0, 0);
-- Segmentation fault
set optimizer=off;
insert into tb values(0, 0);
-- ERROR: no tlist entry for key 3 (cdbmutate.c:1484)
select attrnums from gp_distribution_policy where localoid = 'tb'::regclass;
attrnums
----------
{3}
(1 row)
Also a check for setting non-hashable distribution key from a
parent table in an inherited one didn't work.
create table tc (a point) distributed randomly;
create table td (b int) inherits (tc) distributed by (a);
select * from td;
ERROR: could not find mergejoinable = operator for type 600 (pathkeys.c:1174)
Co-authored-by: Vasiliy Ivanov <7vasiliy@gmail.com>
Reviewed-by: Georgios Kokolatos <gkokolatos@pivotal.io>
darthunix
approved these changes
Aug 19, 2019
dursegov
approved these changes
Aug 19, 2019
RekGRpth
pushed a commit
that referenced
this pull request
Dec 3, 2025
Prior to 3ce2e6a, querying pg_locks (or using pg_lock_status()), approximately 75% of backend memory allocations for resulting tuples weren't registered with Vmtracker or Resource Group Control. This memory would also leak if the query was cancelled or failed. This happened because CdbDispatchCommand(), which was previously used by pg_locks, called libpq to obtain the results that were allocated as PQresult structures with bare malloc(), even on the server side. This patch fixes both untracked memory issues by enforcing Vmtracker routines for PGresult allocations on the server-side. Including postgres.h in frontend code causes several errcode-related macro redefinition warnings. They are now un-definined first. Recursive errors due to mishandled OOM errors are addressed in c4e1085. This PR also adds an additional set of tests, building on top of the said commit. Ticket: ADBDEV-7691
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.