Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHurn-0005iN-NY for pgsql-performance@arkaria.postgresql.org; Thu, 23 Nov 2017 17:00:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHurl-00008A-Ev for pgsql-performance@arkaria.postgresql.org; Thu, 23 Nov 2017 17:00:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eHurl-00007z-0f for pgsql-performance@lists.postgresql.org; Thu, 23 Nov 2017 17:00:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eHuri-0008QI-I6 for pgsql-performance@postgresql.org; Thu, 23 Nov 2017 17:00:43 +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 vANH0e9S005550; Thu, 23 Nov 2017 12:00:40 -0500 From: Tom Lane To: Dmitry Shalashov cc: "pgsql-performance@postgresql.org" Subject: Re: Query became very slow after 9.6 -> 10 upgrade In-reply-to: References: <13426.1511363963@sss.pgh.pa.us> <9755.1511392027@sss.pgh.pa.us> Comments: In-reply-to Dmitry Shalashov message dated "Thu, 23 Nov 2017 17:58:23 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5548.1511456440.1@sss.pgh.pa.us> Date: Thu, 23 Nov 2017 12:00:40 -0500 Message-ID: <5549.1511456440@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dmitry Shalashov writes: > We tried to apply the patch on 10.1 source, but something is wrong it seems: > patch -p1 < ../1.patch > (Stripping trailing CRs from patch; use --binary to disable.) > patching file src/backend/optimizer/plan/analyzejoins.c > (Stripping trailing CRs from patch; use --binary to disable.) > patching file src/backend/utils/adt/selfuncs.c > Hunk #1 succeeded at 3270 (offset -91 lines). > Hunk #2 succeeded at 3304 (offset -91 lines). > Hunk #3 succeeded at 3313 (offset -91 lines). > Hunk #4 succeeded at 3393 (offset -91 lines). > patch unexpectedly ends in middle of line > Hunk #5 succeeded at 3570 with fuzz 1 (offset -91 lines). The line number offsets are expected when applying to v10, but it looks like you failed to transfer the attachment cleanly ... there were certainly not CRs in it when I mailed it. The output on v10 should just look like patching file src/backend/optimizer/plan/analyzejoins.c patching file src/backend/utils/adt/selfuncs.c Hunk #1 succeeded at 3270 (offset -91 lines). Hunk #2 succeeded at 3304 (offset -91 lines). Hunk #3 succeeded at 3313 (offset -91 lines). Hunk #4 succeeded at 3393 (offset -91 lines). Hunk #5 succeeded at 3570 (offset -91 lines). regards, tom lane