News for hackers. Stuff that matters.
Re:PostgreSQL Parallel Query v2 by colanderman on Tuesday March 14, 2017 @07:09PM (#13872383)
Don't forget native logical replication.
Re:PostgreSQL Parallel Query v2 by malisper on Tuesday March 14, 2017 @07:33PM (#13872535)
Logical replication doesn't matter as much to us. We are using CitusDB (in other words sharded Postgres), and we have our own code for handling replication.
Re:PostgreSQL Parallel Query v2 by qeternity on Tuesday March 14, 2017 @08:46PM (#13872933)
Citus should already be saturating i/o during a scan unless you're only hitting one shard. What am I missing about your use case?
Re:PostgreSQL Parallel Query v2 by anarazel on Tuesday March 14, 2017 @10:39PM (#13873355)
In many cases all your data is actually in memory, especially when you can distribute your workload across many machines. If all your data is in memory, you'll very often hit CPU bottlenecks before memory bandwidth issues. Partially because bandwidth, disregarding latency, is just quite high, partially because expression evaluation in postgres isn't that well optimized (yet).
Re:PostgreSQL Parallel Query v2 by malisper on Wednesday March 15, 2017 @12:39AM (#13873856)
We shard our data by customer and individual queries touch only data for one customer. We do split a customer's data into multiple shards, but the number of shards we would need to split each customer into is not worth the overhead of maintaining that many shards.
Re:PostgreSQL Parallel Query v2 by manigandham on Wednesday March 15, 2017 @06:14AM (#13875067)
Why? Is this a security issue? If you're sharing the same distributed table then sharding by customer is limiting the number of nodes/scans in parallel that can run.
Re:PostgreSQL Parallel Query v2 by malisper on Wednesday March 15, 2017 @08:55PM (#13881425)
Having millions of shards is a bit of a pain ops wise. There is also some other costs to having lots of shards. For example, the current Citus distribution planner takes time linear in the number of total shards. This isn't an issue 99% of the time, but since we use a composite type as our distribution key, we have an extremely high constant overhead for planning time. I believe the current median Citus Master planning time is ~350ms. We've talked to Citus about this and have discussed possible solutions. Currently we are trying to purge the composite type from our database.
Re:PostgreSQL Parallel Query v2 by throwaway91111 on Tuesday March 14, 2017 @09:16PM (#13873054)
Doesn't this inherently depend on the query? Shard-local i/o saturation affects the latency of the entire query if you're not expecting the i/o to the client to saturate.
Re:PostgreSQL Parallel Query v2 by qeternity on Tuesday March 14, 2017 @09:44PM (#13873151)
This was exactly my point. But usually you're doing a full scan across all shards, so disk i/o is being saturated by virtue of the MPP sharding.