Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1esyGP-0006rN-RK for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Mar 2018 22:07:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1esyGO-0008WV-53 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Mar 2018 22:07:20 +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.89) (envelope-from ) id 1esyGN-0008WL-Qy for pgsql-hackers@lists.postgresql.org; Mon, 05 Mar 2018 22:07:19 +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 1esyGK-0004Hb-Vu for pgsql-hackers@postgresql.org; Mon, 05 Mar 2018 22:07:18 +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 w25M7AEL022165; Mon, 5 Mar 2018 17:07:10 -0500 From: Tom Lane To: Joe Conway cc: Ashutosh Bapat , Etsuro Fujita , Robert Haas , Pg Hackers , Rushabh Lathia , Michael Paquier Subject: Re: postgres_fdw: perform UPDATE/DELETE .. RETURNING on a join directly In-reply-to: <857d2c90-492a-028e-37b9-66d86d8cd5dc@joeconway.com> References: <5A438A45.2000909@lab.ntt.co.jp> <5A7BE8E6.200@lab.ntt.co.jp> <28606.1518105934@sss.pgh.pa.us> <5A7CFDDA.8050906@lab.ntt.co.jp> <5A7D76CF.8080601@lab.ntt.co.jp> <20134.1518201188@sss.pgh.pa.us> <18653.1518297871@sss.pgh.pa.us> <5A82DCCE.3060107@lab.ntt.co.jp> <29147.1519769644@sss.pgh.pa.us> <23783.1519929258@sss.pgh.pa.us> <5A9928F1.2010206@lab.ntt.co.jp> <21358.1520229112@sss.pgh.pa.us> <25502.1520277552@sss.pgh.pa.us> <857d2c90-492a-028e-37b9-66d86d8! cd5dc@joeconway.com> Comments: In-reply-to Joe Conway message dated "Mon, 05 Mar 2018 12:11:46 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22163.1520287630.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 05 Mar 2018 17:07:10 -0500 Message-ID: <22164.1520287630@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Joe Conway writes: > On 03/05/2018 11:19 AM, Tom Lane wrote: >> Joe, I wonder if you could add "log_autovacuum_min_duration =3D 0" to >> rhinoceros' extra_config options, temporarily? Correlating that log >> output with the log_statement output from the test proper would let >> us confirm or deny whether it's autovacuum. > Done just now. Do you want me to force a run? Both of these runs https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Drhinoceros&dt=3D= 2018-03-05%2020%3A35%3A00 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Drhinoceros&dt=3D= 2018-03-05%2021%3A45%3A02 appear to exonerate autovacuum, and the second seems to destroy the behind-the-scenes-ANALYZE theory entirely, since there was no change in the outputs of the extra instrumentation queries. (In theory there's a window for ANALYZE to have occurred in between, but that's not very credible.) So you can revert the rhinoceros config change if you like --- thanks for making it so quickly! Meanwhile, I'm back to wondering what could possibly have affected the planner's estimates, if pg_proc and pg_statistic didn't change. I confess bafflement ... but we've now eliminated the autovacuum- did-it theory entirely, so it's time to start looking someplace else. I wonder if something in the postgres_fdw remote join machinery is not as deterministic as it should be. regards, tom lane