Question about commit 11cf92f6e2e13c0a6e3f98be3e629e6bd90b74d5 - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Question about commit 11cf92f6e2e13c0a6e3f98be3e629e6bd90b74d5
Date
Msg-id 5C790D59.4070804@lab.ntt.co.jp
Whole thread Raw
Responses Re: Question about commit 11cf92f6e2e13c0a6e3f98be3e629e6bd90b74d5
List 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

pgsql-hackers by date:

Previous
From: "Matsumura, Ryo"
Date:
Subject: RE: SQL statement PREPARE does not work in ECPG
Next
From: Antonin Houska
Date:
Subject: Re: Problems with plan estimates in postgres_fdw