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.96) (envelope-from ) id 1w1Ng5-000Fhi-0K for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Mar 2026 12:01:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w1Nf4-001gKo-2s for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Mar 2026 12:00:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w1Nf4-001gKg-1p for pgsql-hackers@lists.postgresql.org; Sat, 14 Mar 2026 12:00:07 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w1Nf2-000000007PO-3HE7 for pgsql-hackers@lists.postgresql.org; Sat, 14 Mar 2026 12:00:07 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-439a89b6fd0so3012513f8f.2 for ; Sat, 14 Mar 2026 05:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773489603; x=1774094403; darn=lists.postgresql.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=LdTfK2se7uCb/5hz7ZyZGsBxQ5G9UNHI7mFOxtE5xoM=; b=MOIoWqjhM1q53b2bYmsFQfsEGA7JufUV0DsVSMx4t8PydWVr8AzplPKv4T4bRiQPWH KRVlPpVY5cD5c01QANwRyMucNVXFuZYXfrI+kF66KSWhaV/9d/93MsP1VUWMMe53jmxP WPZ0k4tKfsy64ilaagnVbMKzkqV+c/c6Rw0cLBWB1sCg1kEb8PHVUvRApRTNnajP11q4 hucjPbBpyH2GE7k9/rAYeebcI5pFzPCHDS7pV72Lg70mMqNirsBP74Lv72gUpfdjM0qT /4B1+I+nD8FCV3AGveJrgHVrtqE8U2Q+G0FdJA/pHS03XFz/JwGiZHKCdZV66FVf66bE itug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773489603; x=1774094403; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LdTfK2se7uCb/5hz7ZyZGsBxQ5G9UNHI7mFOxtE5xoM=; b=cN55e9vfjwdtsEwF4vtEnXaUJ5p3+hDLQJCLX++JVN4ZnpB4TfRAgVyqILoa/+gRr2 Umz4EA/FXe9w2y38Js5ErUEn+ErN5PIFLw7jeKfq90Rg2H01JTJtZk0nxCppp1Xp/hKV 90qMvf3ChvdKmYMJ5YRNza03x+qmc3OXiB0FAvo/XUYlo2DkSD/urj6lJGc/H9xlgwVG 6R+SGYEZ3jdAmZJtOVo3NqRovP/BN4IM3h70qTwLgwr14WGMsFoR/ECQI2MA0P6EidHn go2gxmI9IeDNlmrSrq+z42NxjzBmBliRjyOrqKzEw0lw/YVP0uhD+hnDx4+g7glGjYBf staw== X-Gm-Message-State: AOJu0Ywgcb7c7CsKfKNDwBfMvQJ9FsrO4uLtQrCvueTwaeJebtw47pS3 HNqt7q5pz0DZOR+e5dQX7sN3klz3/gnvviyyk29/eapEE7EgRnpHexBU X-Gm-Gg: ATEYQzxUnNNYI2D6Jnglv092XgSKXA8ZdTuBcZK20e95SNbPkzyuJKlWUJVR+43PRXU KsMIlqsgwLOyUOrPFqVXTzdTQm5LcjJQA36tezUnnqkv28+KJxgLASgIDjtUbnrvyqwxDC1bwCc 2EgB5f3A0fYUH+Dl6XPIoIXDfIO1IIXOlQiKkeaczNkM9trW7sVfXZMzsDhcHMDj1fEMAMWcELS I6l7sy/4kXNGapbtLhgBt/9SRJqhXQSoHbTfIWeTCLP8poFv0SoY0mYESbScGycrX+AMFCtuUWJ wmHXi4sQrrC8r5nY/2pwVs+McdKvwPXPbD4HW5LxPMUSljpBv/87TcGWMb3SjG2jv94aYyKMDBV q3FJtGNszXetYGCeaOryuwll6w/IRZ5xHMVHqTihxsVI+5pxIA+sPRIh0n70cWd+wZQ6rAekLmb iCBDyCZKDS4kXK4x4rcKXkWBWf X-Received: by 2002:a05:6000:2010:b0:439:b60a:b3ed with SMTP id ffacd0b85a97d-43a04d83c49mr12827661f8f.9.1773489602316; Sat, 14 Mar 2026 05:00:02 -0700 (PDT) Received: from [192.168.0.50] ([89.149.93.164]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439fe22e9ddsm23620613f8f.37.2026.03.14.05.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Mar 2026 05:00:01 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------XiFLiKmfZJPSHvJCgVGNnWvL" Message-ID: Date: Sat, 14 Mar 2026 14:00:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_plan_advice To: Robert Haas , "David G. Johnston" Cc: PostgreSQL Hackers References: Content-Language: en-US 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. --------------XiFLiKmfZJPSHvJCgVGNnWvL Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello Robert, 12.03.2026 19:15, Robert Haas wrote: > I've now committed the main patch. I think that I'm not likely to get > too much more feedback on that in this release cycle, and I judge that > more people will be sad if it doesn't get shipped this cycle than if > it does. That might turn out to be catastrophically wrong, but if many > problem reports quickly begin to emerge, it can always be reverted. > I'm hopeful my testing has been thorough enough to avoid that, but > there's a big difference between lab-testing and real world usage, so > we'll see. I've found a crash inside pgpa_join_path_setup(), reproduced with: echo "geqo_threshold = 2" >/tmp/extra.config TEMP_CONFIG=/tmp/extra.config make -s check -C contrib/pg_plan_advice/ Program terminated with signal SIGSEGV, Segmentation fault. (gdb) bt #0  0x000070820b96d215 in pgpa_join_path_setup (root=0x5ef5a84682b8, joinrel=0x5ef5a8497f10, outerrel=0x5ef5a8472b48,     innerrel=0x5ef5a84baeb8, jointype=JOIN_UNIQUE_INNER, extra=0x7fff08823490) at pgpa_planner.c:602 #1  0x00005ef57df9742b in add_paths_to_joinrel (root=0x5ef5a84682b8, joinrel=0x5ef5a8497f10, outerrel=0x5ef5a8472b48,     innerrel=0x5ef5a84baeb8, jointype=JOIN_UNIQUE_INNER, sjinfo=0x5ef5a8473c00, restrictlist=0x5ef5a8498450) at joinpath.c:178 #2  0x00005ef57df9d178 in populate_joinrel_with_paths (root=0x5ef5a84682b8, rel1=0x5ef5a8472b48, rel2=0x5ef5a84731f0,     joinrel=0x5ef5a8497f10, sjinfo=0x5ef5a8473c00, restrictlist=0x5ef5a8498450) at joinrels.c:1197 #3  0x00005ef57df9c6ab in make_join_rel (root=0x5ef5a84682b8, rel1=0x5ef5a8472b48, rel2=0x5ef5a84731f0) at joinrels.c:774 #4  0x00005ef57df700be in merge_clump (root=0x5ef5a84682b8, clumps=0x5ef5a8497e60, new_clump=0x5ef5a8497eb0, num_gene=2,     force=false) at geqo_eval.c:259 #5  0x00005ef57df6ff3e in gimme_tree (root=0x5ef5a84682b8, tour=0x5ef5a84ba688, num_gene=2) at geqo_eval.c:198 #6  0x00005ef57df6fe12 in geqo_eval (root=0x5ef5a84682b8, tour=0x5ef5a84ba688, num_gene=2) at geqo_eval.c:101 #7  0x00005ef57df708fa in random_init_pool (root=0x5ef5a84682b8, pool=0x5ef5a84c3988) at geqo_pool.c:108 #8  0x00005ef57df70439 in geqo (root=0x5ef5a84682b8, number_of_rels=2, initial_rels=0x5ef5a84ba1f8) at geqo_main.c:127 #9  0x00005ef57df77aa3 in make_rel_from_joinlist (root=0x5ef5a84682b8, joinlist=0x5ef5a8473b40) at allpaths.c:3902 #10 0x00005ef57df715e2 in make_one_rel (root=0x5ef5a84682b8, joinlist=0x5ef5a8473b40) at allpaths.c:240 #11 0x00005ef57dfbede4 in query_planner (root=0x5ef5a84682b8, qp_callback=0x5ef57dfc5ae9 ,     qp_extra=0x7fff08823af0) at planmain.c:297 ... Could please look at this? Best regards, Alexander --------------XiFLiKmfZJPSHvJCgVGNnWvL Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
Hello Robert,

12.03.2026 19:15, Robert Haas wrote:
I've now committed the main patch. I think that I'm not likely to get
too much more feedback on that in this release cycle, and I judge that
more people will be sad if it doesn't get shipped this cycle than if
it does. That might turn out to be catastrophically wrong, but if many
problem reports quickly begin to emerge, it can always be reverted.
I'm hopeful my testing has been thorough enough to avoid that, but
there's a big difference between lab-testing and real world usage, so
we'll see.

I've found a crash inside pgpa_join_path_setup(), reproduced with:
echo "geqo_threshold = 2" >/tmp/extra.config
TEMP_CONFIG=/tmp/extra.config make -s check -C contrib/pg_plan_advice/

Program terminated with signal SIGSEGV, Segmentation fault.
(gdb) bt
#0  0x000070820b96d215 in pgpa_join_path_setup (root=0x5ef5a84682b8, joinrel=0x5ef5a8497f10, outerrel=0x5ef5a8472b48,
    innerrel=0x5ef5a84baeb8, jointype=JOIN_UNIQUE_INNER, extra=0x7fff08823490) at pgpa_planner.c:602
#1  0x00005ef57df9742b in add_paths_to_joinrel (root=0x5ef5a84682b8, joinrel=0x5ef5a8497f10, outerrel=0x5ef5a8472b48,
    innerrel=0x5ef5a84baeb8, jointype=JOIN_UNIQUE_INNER, sjinfo=0x5ef5a8473c00, restrictlist=0x5ef5a8498450) at joinpath.c:178
#2  0x00005ef57df9d178 in populate_joinrel_with_paths (root=0x5ef5a84682b8, rel1=0x5ef5a8472b48, rel2=0x5ef5a84731f0,
    joinrel=0x5ef5a8497f10, sjinfo=0x5ef5a8473c00, restrictlist=0x5ef5a8498450) at joinrels.c:1197
#3  0x00005ef57df9c6ab in make_join_rel (root=0x5ef5a84682b8, rel1=0x5ef5a8472b48, rel2=0x5ef5a84731f0) at joinrels.c:774
#4  0x00005ef57df700be in merge_clump (root=0x5ef5a84682b8, clumps=0x5ef5a8497e60, new_clump=0x5ef5a8497eb0, num_gene=2,
    force=false) at geqo_eval.c:259
#5  0x00005ef57df6ff3e in gimme_tree (root=0x5ef5a84682b8, tour=0x5ef5a84ba688, num_gene=2) at geqo_eval.c:198
#6  0x00005ef57df6fe12 in geqo_eval (root=0x5ef5a84682b8, tour=0x5ef5a84ba688, num_gene=2) at geqo_eval.c:101
#7  0x00005ef57df708fa in random_init_pool (root=0x5ef5a84682b8, pool=0x5ef5a84c3988) at geqo_pool.c:108
#8  0x00005ef57df70439 in geqo (root=0x5ef5a84682b8, number_of_rels=2, initial_rels=0x5ef5a84ba1f8) at geqo_main.c:127
#9  0x00005ef57df77aa3 in make_rel_from_joinlist (root=0x5ef5a84682b8, joinlist=0x5ef5a8473b40) at allpaths.c:3902
#10 0x00005ef57df715e2 in make_one_rel (root=0x5ef5a84682b8, joinlist=0x5ef5a8473b40) at allpaths.c:240
#11 0x00005ef57dfbede4 in query_planner (root=0x5ef5a84682b8, qp_callback=0x5ef57dfc5ae9 <standard_qp_callback>,
    qp_extra=0x7fff08823af0) at planmain.c:297
...

Could please look at this?

Best regards,
Alexander
--------------XiFLiKmfZJPSHvJCgVGNnWvL--