Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF3Rr-0000Q8-Dt for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Dec 2016 18:29:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cF3Rr-0003Lz-1f for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Dec 2016 18:29:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cF3QS-0001mn-SO for pgsql-hackers@postgresql.org; Thu, 08 Dec 2016 18:28:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cF3QQ-0000xB-17 for pgsql-hackers@postgresql.org; Thu, 08 Dec 2016 18:28:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id uB8IS7XX007785; Thu, 8 Dec 2016 13:28:07 -0500 From: Tom Lane To: Robert Haas cc: Jeff Janes , pgsql-hackers Subject: Re: postgres_fdw bug in 9.6 In-reply-to: References: <6319.1481219450@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Thu, 08 Dec 2016 13:04:31 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7783.1481221687.1@sss.pgh.pa.us> Date: Thu, 08 Dec 2016 13:28:07 -0500 Message-ID: <7784.1481221687@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > Maybe it would help for Jeff to use elog_node_display() to the nodes > that are causing the problem - e.g. outerpathkeys and innerpathkeys > and best_path->path_mergeclauses, or just best_path - at the point > where the error is thrown. That might give us enough information to > see what's broken. I'll be astonished if that's sufficient evidence. We already know that the problem is that the input path doesn't claim to be sorted in a way that would match the merge clauses, but that doesn't tell us how such a path came to be generated (or, if it wasn't intentionally done, where the data structure got clobbered later). It's possible that setting a breakpoint at create_mergejoin_path and capturing stack traces for all calls would yield usable insight. But there are likely to be lots of calls if this is an 8-way join query, and probably only a few are wrong. I'd much rather have a test case than try to debug this remotely. Bandwidth too low. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers