back
user profile
levkk
2,541karma·349submissions·February 9, 2022
about
Sharding Postgres. <https://pgdog.dev>
lev@pgdog.dev
recent activity (349 total)
comment
Thanks! Business plan is managed deployments and support, pretty standard for an infra product I believe.
comment
That's exactly what I'm saying!
comment
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 …
comment
I can run it for you! Email me: lev@pgdog.dev
comment
You shard posts on posts.userid as well, same hashing function, same number of shards.
comment
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 key…
comment
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,…
comment
Will do. You're not the first one to recommend this, it's about time I listen.
comment
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!
comment
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 com…
comment
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.
comment
Exactly :)
comment
Yup.
comment
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 …
comment
You're right. Good catch, I'll fix this in the article.
comment
We're using it to rewrite queries too. It's a pretty cool library.
comment
Not usually, that's considered an potential attack vector I believe. You're looking to minimize information leakage.
comment
Pretty sure kernel doesn't have to fsync on close. In fact, you don't want it to, otherwise you're limiting the performance of your page cache. So fsync on install for dpkg makes perfec…
comment
Good call-out. The article mentions using a representative sample, but I should definitely put it somewhere on top.
comment
I ended up adding support for GROUP BY: https://github.com/pgdogdev/pgdog/pull/43 I had it in the back of my mind for a while, nice to have it in code. Works pretty wel…