Currently, the storage type is always set as ‘t’ in pgs_distribution_metadata.shard. We also have a SHARD_STORAGE_FOREIGN in distribution_metadata.h. I think we should use that for foreign tables.
Also, this does not seem to hamper anything. I tried with cstore_fdw and INSERT commands for foreign tables are routed to the correct worker shards. The worker node commands fail as INSERT is not yet implemented for cstore_fdw but pg_shard logic on the master seems to work correctly.
From @samay-sharma on November 21, 2014 15:12
Currently, the storage type is always set as
‘t’
inpgs_distribution_metadata.shard
. We also have aSHARD_STORAGE_FOREIGN
in distribution_metadata.h. I think we should use that for foreign tables.Also, this does not seem to hamper anything. I tried with cstore_fdw and
INSERT
commands for foreign tables are routed to the correct worker shards. The worker node commands fail asINSERT
is not yet implemented for cstore_fdw but pg_shard logic on the master seems to work correctly.