Open
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
21b6a3e to
91d1b6f
Compare
91d1b6f to
73819ec
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a big one.
For cross-shard
SELECTqueries that we don't support yet (some aggregate functions, CTEs / subqueries without the sharding key,OFFSET x, window functions), fallback to using thepostgres_fdwextension.We run an empty Postgres DB as a "sidecar" (subprocess of PgDog, really), and on boot, create all the foreign tables, partitioned by hash/list/range as configured in
pgdog.toml. Partitioned tables are supported too, we use two-tier partitioning there, child tables use fdw.We import custom types, schemas and extensions prior to this, so it should just work(tm).
When a query comes in, pgdog will check that any of the conditions are true, and if so, send the query to the fdw connection pool which will forward it to the shards via fdw, assembling the rows just like it would normally.
This is a superpower. If this works as intended, we will achieve 100% Postgres compatibility in a sharded world.