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.
1y ago·view thread
comment
That's exactly what I'm saying!
1y ago·view thread
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 …
1y ago·view thread
comment
I can run it for you! Email me: lev@pgdog.dev
1y ago·view thread
comment
You shard posts on posts.userid as well, same hashing function, same number of shards.
1y ago·view thread
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…
1y ago·view thread
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,…
1y ago·view thread
comment
Will do. You're not the first one to recommend this, it's about time I listen.
1y ago·view thread
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!
1y ago·view thread
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…
1y ago·view thread
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.
1y ago·view thread
comment
Exactly :)
1y ago·view thread
comment
Yup.
1y ago·view thread
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 …
1y ago·view thread
comment
You're right. Good catch, I'll fix this in the article.
1y ago·view thread
comment
We're using it to rewrite queries too. It's a pretty cool library.
1y ago·view thread
comment
Not usually, that's considered an potential attack vector I believe. You're looking to minimize information leakage.
1y ago·view thread
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…
1y ago·view thread
comment
Good call-out. The article mentions using a representative sample, but I should definitely put it somewhere on top.
1y ago·view thread
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…
1y ago·view thread