Question about commit 11cf92f6e2e13c0a6e3f98be3e629e6bd90b74d5

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Question about commit 11cf92f6e2e13c0a6e3f98be3e629e6bd90b74d5
Date: 2019-03-01 10:45:45
Message-ID: 5C790D59.4070804@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Robert, I CCed you because you are the author of that commit. Before
that commit ("Rewrite the code that applies scan/join targets to
paths."), apply_scanjoin_target_to_paths() had a boolean parameter named
modify_in_place, and used apply_projection_to_path(), not
create_projection_path(), to adjust scan/join paths when modify_in_place
was true, which allowed us to save cycles at plan creation time by
avoiding creating projection paths, which I think would be a good thing,
but that commit removed that. Why?

The real reason for this question is: I noticed that projection paths
put on foreign paths will make it hard for FDWs to detect whether there
is an already-well-enough-sorted remote path in the pathlist for the
final scan/join relation as an input relation to GetForeignUpperPaths()
for the UPPERREL_ORDERED step (the IsA(path, ForeignPath) test would not
work well enough to detect remote paths!), so I'm wondering whether we
could revive that parameter like the attached, to avoid the overhead at
plan creation time and to make the FDW work easy. Maybe I'm missing
something, though.

Best regards,
Etsuro Fujita

Attachment Content-Type Size
apply-scanjoin-targets.patch text/x-patch 9.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2019-03-01 11:00:41 Re: Problems with plan estimates in postgres_fdw
Previous Message Matsumura, Ryo 2019-03-01 10:42:34 RE: SQL statement PREPARE does not work in ECPG