+1 for adding a new system attribute. We did something similar in
Postgres-XC, though problem there was much simpler because we always knew that the remote FDW is a Postgres instance running the same version. So we added a new system column "node_id" which does not get any disk storage, but gets set during execution time depending on which node the tuple belongs to. The ctid system column of course is set to the remote ctid.
Just thinking aloud... This could also be merged in XC code and reduce XC code footprint on PG core.