Failed assertion in joininfo.c, remove_join_clause_from_rels

2023-12-27 Thread Andreas Seltenreich
Hi, SQLsmith found a failing Assertion in joininfo.c on master. I can reproduce it on an assertion-enabled build like this: create table t1(a int primary key); create table t2(a int); select * from t2 right join (t1 as t1a inner join t1 as t1b on t1a.a = t1b.a) on t1a.a is not

[sqlsmith] Failed assertion in brin_minmax_multi_distance_float4 on REL_14_STABLE

2021-11-04 Thread Andreas Seltenreich
Hi, sqlsmith triggers the following assertion when testing REL_14_STABLE: TRAP: FailedAssertion("a1 <= a2", File: "brin_minmax_multi.c", Line: 1879, PID: 631814) I can reproduce it with the following query on a fresh regression database: insert into public.brintest_multi (float4col)

Re: Multiple hosts in connection string failed to failover in non-hot standby mode

2021-05-06 Thread Andreas Seltenreich
> On Thu, May 06, 2021 at 01:22:27PM -0400, Tom Lane wrote: >> I'm curious though why it took this long for anyone to complain. >> I'd supposed that people were running sqlsmith against HEAD on >> a pretty regular basis. Last time I ran it was November 27. I'm neglecting it on my spare time and

[sqlsmith] parallel worker errors "subplan ... was not initialized"

2020-11-29 Thread Andreas Seltenreich
Hi, yesterday's sqlsmith run on master at 3df51ca8b3 also yielded 4855 queries failing with ERRORs like the following: , | ERROR: subplan "InitPlan 3 (returns $3)" was not initialized | CONTEXT: parallel worker ` They all run fine with parallel scans off. Below is a recipe that

[sqlsmith] Planner error on lateral joins

2020-11-29 Thread Andreas Seltenreich
Hi, testing with sqlsmith on master at 3df51ca8b3 produced one instance of the following error: ERROR: failed to build any 6-way joins I can reproduce it on a fresh regression database with the query below. These were last logged in 2015. Back then, it resulted in this commit:

[sqlsmith] Failed assertion during partition pruning

2020-11-28 Thread Andreas Seltenreich
Hi, testing master at 3df51ca8 with sqlsmith triggers the following assertion: TRAP: FailedAssertion("!bms_is_empty(present_parts)", File: "partprune.c", Line: 588, PID: 8540) I looked at a dozen backtraces and they all sport a window aggregate but that may still be random chance since

Re: Performance issue in foreign-key-aware join estimation

2019-07-21 Thread Andreas Seltenreich
David Rowley writes: > On Thu, 18 Jul 2019 at 19:24, David Rowley > wrote: >> Unless there's some objection, I'll be looking into pushing both 0001 >> and 0002 in a single commit in the next few days. > > I've pushed this after doing a bit of final tweaking. sqlsmith triggers an assertion in

[sqlsmith] Crash in mcv_get_match_bitmap

2019-07-10 Thread Andreas Seltenreich
Hi, running sqlsmith on the regression database of REL_12_STABLE at ff597b656f yielded a crash in mcv_get_match_bitmap. I can reproduce it with the following query on the regression database: select filler1 from mcv_lists where a is not null and (select 42) <= c; Backtrace below. regards,

Excessive memory usage in multi-statement queries w/ partitioning

2019-05-22 Thread Andreas Seltenreich
Hi, a customer reported excessive memory usage and out-of-memory ERRORs after introducing native partitioning in one of their databases. We could narrow it down to the overhead introduced by the partitioning when issuing multiple statements in a single query. I could reduce the problem to the

[sqlsmith] ERROR: plan should not reference subplan's variable

2018-08-11 Thread Andreas Seltenreich
Hi, sqlsmith caused another internal error while testing REL_11_STABLE at 1b9d1b08fe. The query below on the regression DB yields "plan should not reference subplan's variable" for me. regards, Andreas delete from public.prt1_l where EXISTS ( select from public.xmltest as ref_10 ,

[sqlsmith] ERROR: partition missing from subplans

2018-08-10 Thread Andreas Seltenreich
Hi, running sqlsmith on REL_11_STABLE at 1b9d1b08fe for a couple hours yielded the previously-unseen internal error "partition missing from subplans". It is readily reproducible on the regression database with the following query: select * from public.fk_partitioned_fk as sample_0 tablesample

[sqlsmith] Segfault in expand_tuple

2018-04-07 Thread Andreas Seltenreich
Hi, the following query triggers a segfault for me when run against the regression database. Testing was done with master at 039eb6e92f. Backtrace below. regards, Andreas select case when pg_catalog.lastval() < pg_catalog.pg_stat_get_bgwriter_maxwritten_clean() then case when

Re: [HACKERS] MERGE SQL Statement for PG11

2018-04-07 Thread Andreas Seltenreich
Hi, sqlsmith triggered an assertion with the following MERGE statement against the regression database. Testing was done with master at 039eb6e92f. Backtrace below. regards, Andreas MERGE INTO public.pagg_tab_ml_p3 as target_0 USING public.hash_i4_heap as ref_0 ON target_0.b = ref_0.seqno

Re: [sqlsmith] Failed assertion in create_gather_path

2018-04-07 Thread Andreas Seltenreich
Tom Lane writes: > Alvaro Herrera <alvhe...@alvh.no-ip.org> writes: >> Andreas Seltenreich wrote: >>> as of 039eb6e92f: >>> TRAP: FailedAssertion("!(subpath->parallel_safe)", File: "pathnode.c", >>> Line: 1813) > >> U

[sqlsmith] Failed assertion on pfree() via perform_pruning_combine_step

2018-04-07 Thread Andreas Seltenreich
Hi, testing with master at 039eb6e92f yielded another query triggering an assertion. Backtrace and query against the regression database below. regards, Andreas #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x7f25474cf42a in __GI_abort () at abort.c:89 #2

[sqlsmith] Failed assertion in create_gather_path

2018-04-07 Thread Andreas Seltenreich
Hi, sqlsmith found a query that triggers the following assertion in master as of 039eb6e92f: TRAP: FailedAssertion("!(subpath->parallel_safe)", File: "pathnode.c", Line: 1813) Backtrace and recipe against the regression database below. regards, Andreas #0 __GI_raise (sig=sig@entry=6) at

Re: [HACKERS] MERGE SQL Statement for PG11

2018-02-18 Thread Andreas Seltenreich
Pavan Deolasee writes: > Thanks for doing those tests. I've just sent v16a version of the patch and > I think it fixes the issues reported so far. Can you please recheck? Please > let me know if there are other issues detected by sqlsmith or otherwise. I re-did the testing with merge_v16a

Re: [HACKERS] MERGE SQL Statement for PG11

2018-02-04 Thread Andreas Seltenreich
Simon Riggs writes: > It will likely take some time to work through these and the current > work items but will fix. > > Do you have the DDL so we can recreate these easily? Attached are testcases that trigger the assertions when run against an empty database instead of the one left behind by

Re: [HACKERS] MERGE SQL Statement for PG11

2018-02-03 Thread Andreas Seltenreich
Hi, as promised in Brussels, I taught sqlsmith about MERGE and did some testing with merge.v14.patch applied on master at 9aef173163. So far, it found a couple of failing assertions and a suspicous error message. Details and Testcases against the regression database below. regards, Andreas --

Re: [sqlsmith] Parallel worker executor crash on master

2017-12-16 Thread Andreas Seltenreich
Thomas Munro writes: > On Sat, Dec 16, 2017 at 10:13 PM, Andreas Seltenreich > <seltenre...@gmx.de> wrote: >> Core was generated by `postgres: smith regression [local] SELECT >>'. >> Program terminated with signal SIGSEGV, Segmentatio

Re: [sqlsmith] Parallel worker executor crash on master

2017-12-16 Thread Andreas Seltenreich
Amit Kapila writes: > This seems to be another symptom of the problem related to > es_query_dsa for which Thomas has sent a patch on a different thread > [1]. After applying that patch, I am not able to see the problem. I > think due to the wrong usage of dsa across nodes, it can lead to >

[sqlsmith] Parallel worker executor crash on master

2017-12-15 Thread Andreas Seltenreich
Hi, sqlsmith just crashed a parallel worker while testing master at 699bf7d05c. I can reproduce it with the following recipe on a fresh regression database. Backtrace and query plan below as well. regards, Andreas --8<---cut here---start->8--- set