Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r015E-002gho-9I for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Nov 2023 15:00:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r015C-00Gc7l-TW for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Nov 2023 15:00:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r015C-00Gc7b-Jw for pgsql-hackers@lists.postgresql.org; Mon, 06 Nov 2023 15:00:06 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r015A-004Faq-B6 for pgsql-hackers@postgresql.org; Mon, 06 Nov 2023 15:00:05 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507973f3b65so6051084e87.3 for ; Mon, 06 Nov 2023 07:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699282803; x=1699887603; darn=postgresql.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=TtQSG5q5ZPAiGfGdlqkfqHwRl2FApss3vSIcqeRt4kg=; b=grHiWI8DbJf3hUxzG88h8nilrh+Yzgxftig3rI7vkMKAes+gkeQmZw9fRtto2s4S+L 6Qk8cmdGKK2y6QMrOl2dghyTcEcnVUChTQxWvlxXhTzp2UrCz7GijnVJWcsh2C5aT8jg y1+5l210ich54P91XTeBvxPATsqCSlae9eTkNEksivKXO4WmStGCBOk6MRuHfiZJZoou qsNnOK7eigaRkQyBZyzQkzJhRl6qMbU91p+zuNb0JiDAwJOoQzgBPQPCSKDP+siCwCgL DFxpU7tqAYKpANl654FM0wynr6RPDe2A3moGFbnStrzHGPb1+VdcTGZ1zBky0QUk82zH CC8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699282803; x=1699887603; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=TtQSG5q5ZPAiGfGdlqkfqHwRl2FApss3vSIcqeRt4kg=; b=tvb039/DcDFTdGi31rif2sSr+QfZX0nD4iwF1oZt7mchxnbyRgZ/gm8pkBxmmPw3i9 Tn3Ve+Tffd0D4ADH6w8huKnYR3wEpyc2kCPJahAXL499uPkiowOk1fITdGwmU4zK+nDL /vWQGzr0n0mynRnI0QpuYAk2rv+mVCvMa2NsyTaguKVBl03n0WX/ZXxt4BlOvv9uWsCn 1qsv2VQ+/czleuvRdPKD64g9/ukVibECT2gOmrh4eASZY8kRp1Ct6KjDQ9n0LPFX73Kx fN7KaHgQk6E45FADSnS0Gon2CTF2P/fEqHbAlDklji8p0Qe6oLgZzi4NLuLxDzlVRa5Y jhhA== X-Gm-Message-State: AOJu0Yz5gfQaeFxGiSrBRbN48LBHrbfZoT9+HG2MFcxCimr4fusEoaad cKCivblTyxl3run6211iXSA= X-Google-Smtp-Source: AGHT+IHy9b7S9kDIpsPhebhhUyYZsf5bvn7H44+kXXgedIogWngq4GC4njEaxlQrKgSZrCbttvD66g== X-Received: by 2002:a05:6512:3594:b0:507:a0bc:4aec with SMTP id m20-20020a056512359400b00507a0bc4aecmr20412687lfr.64.1699282802528; Mon, 06 Nov 2023 07:00:02 -0800 (PST) Received: from [1.0.0.7] ([178.155.28.40]) by smtp.gmail.com with ESMTPSA id u24-20020a196a18000000b005068d27e9a7sm1147553lfu.172.2023.11.06.07.00.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Nov 2023 07:00:01 -0800 (PST) Content-Type: multipart/alternative; boundary="------------iWLOptNWIHywOveUbmTPUkRB" Message-ID: Date: Mon, 6 Nov 2023 18:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Support run-time partition pruning for hash join Content-Language: en-US To: Richard Guo Cc: David Rowley , Andy Fan , PostgreSQL-development References: <600a153e-191b-952d-7090-cad5097b798f@gmail.com> From: Alexander Lakhin In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------iWLOptNWIHywOveUbmTPUkRB Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello Richard, 06.11.2023 06:05, Richard Guo wrote: > > Fixed this issue in v4. > Please look at a warning and an assertion failure triggered by the following script: set parallel_setup_cost = 0; set parallel_tuple_cost = 0; set min_parallel_table_scan_size = '1kB'; create table t1 (i int) partition by range (i); create table t1_1 partition of t1 for values from (1) to (2); create table t1_2 partition of t1 for values from (2) to (3); insert into t1 values (1), (2); create table t2(i int); insert into t2 values (1), (2); analyze t1, t2; select * from t1 right join t2 on t1.i = t2.i; 2023-11-06 14:11:37.398 UTC|law|regression|6548f419.392cf5|WARNING: Join partition pruning $0 has not been performed yet. TRAP: failed Assert("node->as_prune_state"), File: "nodeAppend.c", Line: 846, PID: 3747061 Best regards, Alexander --------------iWLOptNWIHywOveUbmTPUkRB Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hello Richard,

06.11.2023 06:05, Richard Guo wrote:

Fixed this issue in v4.


Please look at a warning and an assertion failure triggered by the
following script:
set parallel_setup_cost = 0;
set parallel_tuple_cost = 0;
set min_parallel_table_scan_size = '1kB';

create table t1 (i int) partition by range (i);
create table t1_1 partition of t1 for values from (1) to (2);
create table t1_2 partition of t1 for values from (2) to (3);
insert into t1 values (1), (2);

create table t2(i int);
insert into t2 values (1), (2);
analyze t1, t2;

select * from t1 right join t2 on t1.i = t2.i;

2023-11-06 14:11:37.398 UTC|law|regression|6548f419.392cf5|WARNING:  Join partition pruning $0 has not been performed yet.
TRAP: failed Assert("node->as_prune_state"), File: "nodeAppend.c", Line: 846, PID: 3747061

Best regards,
Alexander
--------------iWLOptNWIHywOveUbmTPUkRB--