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 1rkRxd-00CoCW-0o for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Mar 2024 17:00:13 +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 1rkRxa-008PXI-W1 for pgsql-hackers@arkaria.postgresql.org; Wed, 13 Mar 2024 17:00:11 +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.94.2) (envelope-from ) id 1rkRxa-008PX9-Mg for pgsql-hackers@lists.postgresql.org; Wed, 13 Mar 2024 17:00:11 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rkRxU-004L70-Fn for pgsql-hackers@lists.postgresql.org; Wed, 13 Mar 2024 17:00:10 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2d26227d508so225141fa.2 for ; Wed, 13 Mar 2024 10:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710349203; x=1710954003; darn=lists.postgresql.org; h=content-transfer-encoding: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=uaGPLehztmFGLd76bV81z7Ik3TK9tqtpxlOT99On9LM=; b=X3GClt79mKgryvODqaoX/JW0V9QwtRXXYEKynCoQBbxZwG9c02b8jVHJZj0jE2+vgm 1KKT1zEaHNRwepfWTFR3y0Ty8r4gdLea1XOPt9FmepgzuBbCPoqiKe6SFbBAQpDFJzmG ceA3RjNU+WsjLobppwYt2BnOn0A+IDkuceGYDlM5FzN+Oq5Fn6jCL4hxobh9jVck+vRY 39q35H1YxFgTdhV2E57jAFO5r2qL6G3ialyYRwnZ1tWJzPD8Qx8s6VOcozWTUjT4MU6T YUedpqERYO+QEnjHDArc8qbTYMHhT6MYN9EIk1W6N+hGdkBVsqM9TD14TO/rLxA6ninK RC2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710349203; x=1710954003; h=content-transfer-encoding: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=uaGPLehztmFGLd76bV81z7Ik3TK9tqtpxlOT99On9LM=; b=oMXDrVbOicRRNBR1FxUYT0HgjoJdljhBnDmYecwIMRvEWNrxNy+UaMBEWCxUQ4a3ba lGdMmNj3Fd1vwsZ5Q99gpvg6vw2E5+UPlL+qTNdHOoqfSWHdKAYo9MDWCcjwvyPNUEBn zqITDENkJJeGgamvZ/G1fw4FyrmDnOFlVBL0MOc59pGVNxeT4InVjdavUBE36zeh6dit +lO7uKhXIPG6vvZpm1sWcJQ+ww6Bce3NZ43WN3MHsociIQlTSFZisFlJiEZAkAbLbEG1 MsjTNRc1y0prp1hCnraDloSwx2wLCwdUH8byfrXoA/UTH3Zpvoq0RCTXg0bRBopCqOBy POig== X-Forwarded-Encrypted: i=1; AJvYcCUxcl9TxCSSNjLDUQbtbUK9vxUdSBEXKiojhHcY7647Gs1nLhhMocFrbI9rHb6LlW3FrXXhzRT399YhPX+Eqvh1z5ADt76uEZHSid4YVYru805a X-Gm-Message-State: AOJu0Yz0GN+jgVhR9VCZBpSmEPZXqCqlKPB5y2j9GeSq7hGeTRwiC9pX +tSCpqy37x4xGoPqKAG6qIAy+88EPXqc3jyWPoXZMttchDafLyw9 X-Google-Smtp-Source: AGHT+IEMt2yHk7BmMCrFCWgg3cC9RN1QuPg4FfrAd5iNdTxemDsyxxSmqe5PMm7M73K9eqcSPEXPuQ== X-Received: by 2002:a2e:7203:0:b0:2d3:9354:fe07 with SMTP id n3-20020a2e7203000000b002d39354fe07mr8704524ljc.5.1710349202931; Wed, 13 Mar 2024 10:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.30.186]) by smtp.gmail.com with ESMTPSA id bi37-20020a05651c232500b002d361916b1fsm2224845ljb.32.2024.03.13.10.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Mar 2024 10:00:02 -0700 (PDT) Message-ID: Date: Wed, 13 Mar 2024 20: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: pg16: XX000: could not find pathkey item to sort Content-Language: en-US To: David Rowley , Richard Guo Cc: Justin Pryzby , pgsql-hackers@lists.postgresql.org References: From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello David, 09.10.2023 07:13, David Rowley wrote: > On Mon, 9 Oct 2023 at 12:42, David Rowley wrote: >> Maybe it's worth checking the total planning time spent in a run of >> the regression tests with and without the patch to see how much >> overhead it adds to the "average case". > I've now pushed the patch that trims off the Pathkeys for the ORDER BY > / DISTINCT aggregates. > I've stumbled upon the same error, but this time it apparently has another cause. It can be produced (on REL_16_STABLE and master) as follows: CREATE TABLE t (a int, b int) PARTITION BY RANGE (a); CREATE TABLE td PARTITION OF t DEFAULT; CREATE TABLE tp1 PARTITION OF t FOR VALUES FROM (1) TO (2); SET enable_partitionwise_aggregate = on; SET parallel_setup_cost = 0; SELECT a, sum(b order by b) FROM t GROUP BY a ORDER BY a; ERROR:  could not find pathkey item to sort `git bisect` for this anomaly blames the same commit 1349d2790. Best regards, Alexander