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 1qzDRs-00EfS2-5e for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Nov 2023 10:00:12 +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 1qzDRp-005WuX-Nq for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Nov 2023 10:00:09 +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 1qzDRp-005WuP-A7 for pgsql-hackers@lists.postgresql.org; Sat, 04 Nov 2023 10:00:09 +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 1qzDRm-003uMe-MJ for pgsql-hackers@postgresql.org; Sat, 04 Nov 2023 10:00:08 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507a0907896so3598787e87.2 for ; Sat, 04 Nov 2023 03:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699092004; x=1699696804; 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=bPlz6/mSAYLmK0QsMHsjjnNxBbLta1tNa+8Rx0W+PKQ=; b=SYV55XGoopYwJkW0N0ZcbdJEEMNCi5aXICZ8ZS3i0OEPeChE3TplUfR8oE+c2kNIci Pzs6VFW4pcpTT7zcxD5CngmyuilsxmHU1JVN2rqRpPWlnpTDOa1sabi1PCor+pPgMX7N GoYtz6fu2upMg9qE6SHsyR9CDx8mpqdWQGuc3Oj8pWtvalQO8MkDxu4cB9KQo3KkLkf3 GK/Egaa3zXmBfZRd12nFYCkiwJfho2IFpQerwB5OHI5MqqXgsJPW5QiLBT4vtvmHVDlF MuS4x8M4y53nmhMfTRlRLJ8bi7AAcErM1efvZUX11hMLuLLFa6vDVXK0kOKfAfZVo8MM HNgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699092004; x=1699696804; 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=bPlz6/mSAYLmK0QsMHsjjnNxBbLta1tNa+8Rx0W+PKQ=; b=ph2O6pQtVk6bkABBOLxMNjNtlx7b9IsFZm2Rah0kPNhycEd2hhgFkcj/S6wo3Ynmci FdHP5bDIfDyWg6CZXh+T6RJWz/Zv/UwIM1axXihrehAmqbVvwu3JMbJZKXIa510aGFQe JfWpQAvXD6oMvUB2r+eKdbFeC0JjlDiaCLgYZtGJ/9bPjXRSLm/rBL0tFow9kUJtgs9i OI5A5LUPRWeW2O4U1cCa1cmDhPxcEb3oIknZRfl4mw49Cw23n1U3Jl7zNpokffAPeSw2 gJmeVA1dnkWWxvITC7lGPBb0LbqkY4aT6uJSAjWgf/1c7f9YbsuPp+NpzMJvKSrsWPc1 dedA== X-Gm-Message-State: AOJu0YylChBbSGvS3DY29l+uMpaL94QJ8QWJWxLwsJixnQnhimQC+ZVc j1xChwyvp7Yod8zPc3La9ZE= X-Google-Smtp-Source: AGHT+IHsknVjbYCT9T9lFj7GBVGugkoXYnsmCjaQRbfic+EZqdofEv3aSFqYX8UC3G41bt9mdxIsPA== X-Received: by 2002:a19:ac4a:0:b0:507:b993:bb86 with SMTP id r10-20020a19ac4a000000b00507b993bb86mr16289671lfc.66.1699092003655; Sat, 04 Nov 2023 03:00:03 -0700 (PDT) Received: from [1.0.0.7] ([178.155.28.40]) by smtp.gmail.com with ESMTPSA id q20-20020ac25294000000b00503f39e6bcesm470886lfm.95.2023.11.04.03.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Nov 2023 03:00:02 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------OO4XZ7yHuLsFh00oDOPQ2w7G" Message-ID: <600a153e-191b-952d-7090-cad5097b798f@gmail.com> Date: Sat, 4 Nov 2023 13: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 , David Rowley Cc: Andy Fan , PostgreSQL-development References: 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. --------------OO4XZ7yHuLsFh00oDOPQ2w7G Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello Richard, 02.11.2023 14:19, Richard Guo wrote: > > However, the cfbot indicates that there are test cases that fail on > FreeBSD [1] (no failure on other platforms).  So I set up a FreeBSD-13 > locally but just cannot reproduce the failure.  I must be doing > something wrong.  Can anyone give me some hints or suggestions? > > FYI. The failure looks like: > >  explain (costs off) >    select p2.a, p1.c from permtest_parent p1 inner join permtest_parent p2 >    on p1.a = p2.a and left(p1.c, 3) ~ 'a1$'; > -                     QUERY PLAN > ----------------------------------------------------- > - Hash Join > -   Hash Cond: (p2.a = p1.a) > -   ->  Seq Scan on permtest_grandchild p2 > -   ->  Hash > -         ->  Seq Scan on permtest_grandchild p1 > -               Filter: ("left"(c, 3) ~ 'a1$'::text) > -(6 rows) > - > +ERROR:  unrecognized node type: 1130127496 I've managed to reproduce that failure on my Ubuntu with: CPPFLAGS="-Og -DWRITE_READ_PARSE_PLAN_TREES -DCOPY_PARSE_PLAN_TREES" ./configure ... make check ...  SELECT t1, t2 FROM prt1 t1 LEFT JOIN prt2 t2 ON t1.a = t2.b WHERE t1.b = 0 ORDER BY t1.a, t2.b; -                    QUERY PLAN --------------------------------------------------- - Sort -   Sort Key: t1.a, t2.b -   ->  Hash Right Join -         Hash Cond: (t2.b = t1.a) -         ->  Append -               ->  Seq Scan on prt2_p1 t2_1 -               ->  Seq Scan on prt2_p2 t2_2 -               ->  Seq Scan on prt2_p3 t2_3 -         ->  Hash -               ->  Append -                     ->  Seq Scan on prt1_p1 t1_1 -                           Filter: (b = 0) -                     ->  Seq Scan on prt1_p2 t1_2 -                           Filter: (b = 0) -                     ->  Seq Scan on prt1_p3 t1_3 -                           Filter: (b = 0) -(16 rows) - +ERROR:  unrecognized node type: -1465804424 ... As far as I can see from https://cirrus-ci.com/task/6642692659085312, the FreeBSD host has the following CPPFLAGS specified: -DRELCACHE_FORCE_RELEASE -DCOPY_PARSE_PLAN_TREES -DWRITE_READ_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS Best regards, Alexander --------------OO4XZ7yHuLsFh00oDOPQ2w7G Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hello Richard,

02.11.2023 14:19, Richard Guo wrote:

However, the cfbot indicates that there are test cases that fail on
FreeBSD [1] (no failure on other platforms).  So I set up a FreeBSD-13
locally but just cannot reproduce the failure.  I must be doing
something wrong.  Can anyone give me some hints or suggestions?

FYI. The failure looks like:

 explain (costs off)
   select p2.a, p1.c from permtest_parent p1 inner join permtest_parent p2
   on p1.a = p2.a and left(p1.c, 3) ~ 'a1$';
-                     QUERY PLAN
-----------------------------------------------------
- Hash Join
-   Hash Cond: (p2.a = p1.a)
-   ->  Seq Scan on permtest_grandchild p2
-   ->  Hash
-         ->  Seq Scan on permtest_grandchild p1
-               Filter: ("left"(c, 3) ~ 'a1$'::text)
-(6 rows)
-
+ERROR:  unrecognized node type: 1130127496

I've managed to reproduce that failure on my Ubuntu with:
CPPFLAGS="-Og -DWRITE_READ_PARSE_PLAN_TREES -DCOPY_PARSE_PLAN_TREES" ./configure ... make check
...
 SELECT t1, t2 FROM prt1 t1 LEFT JOIN prt2 t2 ON t1.a = t2.b WHERE t1.b = 0 ORDER BY t1.a, t2.b;
-                    QUERY PLAN                    
---------------------------------------------------
- Sort
-   Sort Key: t1.a, t2.b
-   ->  Hash Right Join
-         Hash Cond: (t2.b = t1.a)
-         ->  Append
-               ->  Seq Scan on prt2_p1 t2_1
-               ->  Seq Scan on prt2_p2 t2_2
-               ->  Seq Scan on prt2_p3 t2_3
-         ->  Hash
-               ->  Append
-                     ->  Seq Scan on prt1_p1 t1_1
-                           Filter: (b = 0)
-                     ->  Seq Scan on prt1_p2 t1_2
-                           Filter: (b = 0)
-                     ->  Seq Scan on prt1_p3 t1_3
-                           Filter: (b = 0)
-(16 rows)
-
+ERROR:  unrecognized node type: -1465804424
...

As far as I can see from https://cirrus-ci.com/task/6642692659085312,
the FreeBSD host has the following CPPFLAGS specified:
-DRELCACHE_FORCE_RELEASE
-DCOPY_PARSE_PLAN_TREES
-DWRITE_READ_PARSE_PLAN_TREES
-DRAW_EXPRESSION_COVERAGE_TEST
-DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS

Best regards,
Alexander
--------------OO4XZ7yHuLsFh00oDOPQ2w7G--