-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postgres_fdw does not work when pg_shard is on shared_preload_libraries #96
Comments
Wow, looks like there's an avalanche of independent discoveries of errors related to shared library(ies) symbol resolution. Just a couple days ago, was looking at a segfault where a library loaded with shared_preload_libraries had a yet-unfixed-for-PG-9.4+ copy of a function that a later loaded library also had defined. And since the later loaded library has already fixed the function for-PG-9.4+, it took a while to figure this out since yet-unfixed copy was being used in all places. We've discussed this a little bit and it seems you are planning to use -Bsymbolic on extension side. Have you considered downsides of using it though, as I encountered (or you may have) a few Bsymbolic-Considered-Harmful posts around web[1]. Maybe a little more reliable would be -Bsymbolic-functions? |
I tried to see what happens if we rename GetConnection in pg_shard to something else to avoid this conflict. I was able to create a postgres_fdw table that pointed to a pg_shard table, which allowed me to do joins between a local table and a distributed table. However, when I ran an INSERT command I got the following error:
|
@samay-sharma discovered that postgres_fdw does not work when shared_preload_libraries is set to 'pg_shard'.
When the instructions on this link is followed for postgres_fdw, we get the following error on INSERT statements to postgres_fdw table:
The root of the problem seems to be about linking/loading of shared libraries. postgres_fdw extension calls a function GetConnection() in somewhere in the code. However, since pg_shard is also loaded, pg_shard's GetConnection() function is called.
We might consider this comment in the Makefile.
Also note that, call to DeterminePlannerType(), returns PLANNER_TYPE_POSTGRES, and standard_planner() is called. This error is thrown after standard_planner() is called.
The text was updated successfully, but these errors were encountered: