Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q0yhh-0004mJ-7v for pgsql-bugs@arkaria.postgresql.org; Mon, 22 May 2023 06:07:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q0yhf-0003WV-7g for pgsql-bugs@arkaria.postgresql.org; Mon, 22 May 2023 06:07:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q0yhe-0003WL-Qh for pgsql-bugs@lists.postgresql.org; Mon, 22 May 2023 06:07:30 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1q0yhb-0019IC-E1 for pgsql-bugs@lists.postgresql.org; Mon, 22 May 2023 06:07:29 +0000 Received: from [192.168.28.53] (unknown [192.168.28.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id 8D521E20FD8; Mon, 22 May 2023 09:08:22 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1684735702; bh=FqSls2v8h273c5wZMuJ2bN907trd583z+jLhXX9oRnU=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=Em+cC9vzieSyWUen5LIkAzBW7rTtwj7utXR3PBudl4ijrHBcgX0eZwtKO6Ats3d3d jxTwtmDkFeIchMvqsbuoVNcjWAN/P+0Lc2hpzNN/kgFtruuoUlq5dwuIyf2w8AW93y vOi0Ircjg5JStF39B6zxzSantIl7avjc+hFE8pbANpZ+K1R9uvlMnM5tH/34l7AXHo 0NbzZ38jV2GrqHIaZME+E+rOFcExcYS1X6+xlibav1dZOKjk/6FXbawFMZtzTJOiVm HdBXOrMZiNIxRJnmCrSIHKAwlcqZIK5/RrEC305qxXPKt+QCKp+qrJ4VUVVk948/w5 ONDarY6VLdklg== Message-ID: <32adb59d-e1ea-9ccd-9aac-00677e53b44c@postgrespro.ru> Date: Mon, 22 May 2023 11:07:23 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware) To: Tom Lane , Richard Guo Cc: Robert Haas , PostgreSQL mailing lists References: <0b819232-4b50-f245-1c7d-c8c61bf41827@postgrespro.ru> <402433.1677524538@sss.pgh.pa.us> <2663884e-769a-b298-55b0-014c5a1ee55c@postgrespro.ru> <524303.1677538463@sss.pgh.pa.us> <999171.1677611407@sss.pgh.pa.us> <1526312.1683912310@sss.pgh.pa.us> <27! 66442.1684265014@sss.pgh.pa.us> <3014965.1684293045@sss.pgh.pa.us> <3344781.1684337332@sss.pgh.pa.us> <3732983.1684416513@sss.pgh.pa.us> <288016.1684522205@sss.pgh.pa.us> Content-Language: en-US From: Andrey Lepikhov Organization: Postgres Professional In-Reply-To: <288016.1684522205@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/19/23 23:50, Tom Lane wrote: > Richard Guo writes: >> ... >> We'd be mistaken to think t1/t2 join is removable, because we are >> checking its syntactic relid set, which includes all rels, and so that >> are not aware that t2.a is used by t2/t3 join. > ... > I think your patch is correct. Because the feature pushed into the master, I checked it with the sqlancer tests. During all-weekend run no any problems were found. -- Regards Andrey Lepikhov Postgres Professional