Here are something I cannot confirm for your issue:
I have a postgis table named “rail” and the column name of feature is “oid”. In psogreSQL, I use the below string to query when get feature by id, can you check it on your table to make sure the string or your table is correct?
“select st_asbinary("shape") from "rail" where "oid" in (‘1’);”
And I use the below code to do the work of postgis in postgre, it works well on desktop edition. can you check the code on your environment?
“PostgreSqlFeatureSource source = new PostgreSqlFeatureSource(connectionString, “rail”, “oid”);
source.Srid = 4326;
Feature feature = source.GetFeatureById("1", ReturningColumnsType.NoColumns);”
If there are still anything errors, please let us know.