Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
levkk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
181.
▲
by
levkk
1y ago
Thanks! I'm curious: > I’d want friction on breaking this boundary Why do you want friction? > implications of joining across shards are not the same That's usually well understood and can be tracked with real time metrics.
182.
▲
by
levkk
1y ago
Thank you! Good feedback. The query parser is cached, so if you're using prepared statements or just the extended protocol with placeholders, it's almost free: cost of a mutex + hash lookup. Cross-shard joins will be interesting.
183.
▲
by
levkk
1y ago
It's config driven, so no split brain. All proxies have the same config and deployments are synchronized: 1. pause traffic 2. reload config 3. resume traffic This can be done in under a second. Restarts without downtime can be handled
184.
▲
by
levkk
1y ago
No issues. PgDog is a company, email me if you want to use it internally and we'll work it out. lev@pgdog.dev
185.
▲
by
levkk
1y ago
Absolutely. Join our Discord, if you'd like: https://discord.com/invite/CcBZkjSJdd
186.
▲
by
levkk
1y ago
No. If you're using it internally though, there are no issues. You don't have to share anything. If you're using it externally, e.g. building a PgDog cloud service, you'll need to share any changes you make to PgDog _onl
187.
▲
by
levkk
1y ago
I don't think Supavisor actually does sharding.
188.
▲
by
levkk
1y ago
Thanks! Will do. 15 year journey starts now.
189.
▲
by
levkk
1y ago
Thank you. Years in the making.
190.
▲
by
levkk
1y ago
Thanks! Business plan is managed deployments and support, pretty standard for an infra product I believe.
191.
▲
Show HN: PgDog – Shard Postgres without extensions
(github.com)
307 points
by
levkk
1y ago
|
80 comments
192.
▲
by
levkk
1y ago
That's exactly what I'm saying!
193.
▲
by
levkk
1y ago
There are lots of things that neither the code nor the docs cover, so I suspect that's not quite possible, yet. For example, if you're deploying a Postgres proxy, it will have a TCP timeout setting that you can tweak. Neither the
194.
▲
Multi-tenant Postgres can be easy
(pgdog.dev)
4 points
by
levkk
1y ago
|
0 comments
195.
▲
by
levkk
1y ago
I can run it for you! Email me: lev@pgdog.dev
196.
▲
Replicating Postgres Production Traffic
(pgdog.dev)
4 points
by
levkk
1y ago
|
2 comments
197.
▲
PgDog vs. PgBouncer
(pgdog.dev)
3 points
by
levkk
1y ago
|
0 comments
198.
▲
Sharding a Real Rails App
(pgdog.dev)
2 points
by
levkk
1y ago
|
0 comments
199.
▲
Sharding Mastodon, Part 1
(pgdog.dev)
4 points
by
levkk
1y ago
|
0 comments
200.
▲
Building for Production
(pgdog.dev)
4 points
by
levkk
1y ago
|
0 comments
201.
▲
by
levkk
1y ago
You shard posts on posts.userid as well, same hashing function, same number of shards.
202.
▲
by
levkk
1y ago
There is a bit documentation about configuring foreign keys here: https://docs.pgdog.dev/configuration/pgdog.toml/sharded_tabl... Medium term I can see detecting foreign keys automatically (if constraints exist).
203.
▲
by
levkk
1y ago
It can but it's not the primary goal at the moment. If you want to restrict the number of rows returned, you can rewrite the query to add a LIMIT clause. To control which rows your users can see, you can use row-level security. One thi
204.
▲
by
levkk
1y ago
Will do. You're not the first one to recommend this, it's about time I listen.
205.
▲
by
levkk
1y ago
Paginating over millions of rows isn't really done in OLTP use cases that PgDog is targeting, as far as I know. Would be great to learn about yours though. Feel free to reach out!
206.
▲
by
levkk
1y ago
Thanks! Re: pgcat and longevity, it's actually the opposite. Pgcat is/was an open source project that I worked on in my spare time. Thankfully I found a couple engineers (and the awesome community contributions) at large corps to
207.
▲
by
levkk
1y ago
I'm guessing so it's never zero and can't be confused with something else, like a bunch of NULs. There are a few messages that's don't have a payload, e.g. ParseComplete.
208.
▲
by
levkk
1y ago
Exactly :)
209.
▲
by
levkk
1y ago
Yup.
210.
▲
by
levkk
1y ago
Forgot to add that to the article, but yes, we parse the statement and route SelectStmt[1] to replicas. If there is an UPDATE in the SELECT, we don't handle that at the moment, but can be easily added. [1] https://docs.rs&#x
More ›