create table dml_union_s (a int not null, b numeric default 10.00) distributed by (a) partition by range(b);create table dml_union_s_1_prt_2 partition of dml_union_s for values from (1) to (1001);create table dml_union_s_1_prt_def partition of dml_union_s default;
insert into dml_union_s select generate_series(1,10), generate_series(1,10);
begin;drop table dml_union_s_1_prt_def;-- it is this SQL need run under orca to reproduce the issueselect count(distinct(b)) from dml_union_s;rollback;
-- this SQL fallback to planner nowupdate dml_union_s set a = (select null union select null)::numeric;
begin;
0 because of 8, thusdiff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index cbb23a6ba1..bb8e23bf7c 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -3553,7 +3553,7 @@ AbortTransaction(void) AtEOXact_ComboCid_Dsm_Detach(); AtEOXact_Buffers(false); AtEOXact_RelationCache(false); - AtEOXact_Inval(false); + AtEOXact_Inval(true); AtEOXact_MultiXact(); ResourceOwnerRelease(TopTransactionResourceOwner,
I see your point of a poor performance scenario. But, it seems to me like that
particular example is a user error by providing malformed data into the
workflow. If that is true, then is it really worth optimizing for that
particular scenario?
Thanks,
David
Ah, but a malicious user could probably affect other users' queries. That seems
like a legit issue...
Thanks,
David
Imagine a scenario where we have a malformed ETL/write job that keeps retrying
and failing (for eg due to a column missing from csv), running concurrently
with intensive read workloads having many slices. This is where there will be
significant overhead. Higher the number of backends, more often will we be
spending CPU cycles in SIGetDataEntries() (which also grabs a contentious
LWLock), which is called by every backend and very frequently.
Is it possible to restrict the Invadiation in abort cases only if a reader gang exists for a session (if easy to check)?
Gp_iswrite=True.⚠ External Email