HackerLangs
トップ新着トレンドコメント過去質問紹介求人

levkk

2,208 カルマ登録 4 年前
Sharding Postgres. <https://pgdog.dev>

[email protected]

投稿

Why we built yet another Postgres connection pooler

pgdog.dev
257 ポイント·投稿者 levkk·4 日前·64 コメント

Why we built yet another Postgres connection pooler

pgdog.dev
3 ポイント·投稿者 levkk·5 日前·0 コメント

PgDog is funded and coming to a database near you

pgdog.dev
548 ポイント·投稿者 levkk·先月·261 コメント

PostgreSQL and the OOM Killer: Why We Use Strict Memory Overcommit

ubicloud.com
5 ポイント·投稿者 levkk·先月·3 コメント

Shard Postgres with One Command

pgdog.dev
1 ポイント·投稿者 levkk·3 か月前·0 コメント

Reshard Button

pgdog.dev
2 ポイント·投稿者 levkk·3 か月前·0 コメント

We fixed Postgres connection pooling on serverless with PgDog

circleback.ai
3 ポイント·投稿者 levkk·4 か月前·0 コメント

Show HN: PgDog – Scale Postgres without changing the app

github.com
326 ポイント·投稿者 levkk·5 か月前·63 コメント

PgDog: Connection pooler, load balancer and sharder for PostgreSQL

1 ポイント·投稿者 levkk·5 か月前·0 コメント

Shard Your Database

pgdog.dev
1 ポイント·投稿者 levkk·8 か月前·0 コメント

Shard Your Database

pgdog.dev
3 ポイント·投稿者 levkk·8 か月前·0 コメント

Shard Your Database

pgdog.dev
1 ポイント·投稿者 levkk·8 か月前·0 コメント

Writing Nothing but Docs for a Week

pgdog.dev
2 ポイント·投稿者 levkk·10 か月前·0 コメント

Pub/Sub

docs.pgdog.dev
2 ポイント·投稿者 levkk·10 か月前·0 コメント

Two-Phase Commit

docs.pgdog.dev
3 ポイント·投稿者 levkk·10 か月前·2 コメント

Implement two-phase commit (2pc)

github.com
2 ポイント·投稿者 levkk·10 か月前·0 コメント

コメント

levkk
·昨日·議論
Ouf. I don't know. I don't want to call you out without evidence -- I myself make benchmark claims all the time -- but 50% improvement in OLTP seems suspicious. I get that you used a standard benchmark, and I don't even know what it entails, but my spidey sense is going off. Perhaps, some trade off somewhere that won't make it to prod because it breaks MVCC -- and yes, I saw that it passes regression tests.

Just checking, is fsync on? :) Regression tests don't catch bad IO patterns afaik.

Anyway... sounds like a fun project to work on!
levkk
·一昨日·議論
Pin the client temporarily. I'm assuming that our users know what they are doing. I could be wrong, but so far so good.
levkk
·3 日前·議論
Yes. The plugin architecture supports this currently. That being said, you can use any number of sharding functions we support to do this too.
levkk
·3 日前·議論
Thanks! We try to be very open and explicit about why we chose AGPL. Personally, I like it because it's an extension of GPL, which is a huge reason why I was able to self-teach programming. Just trying to give back.
levkk
·3 日前·議論
Handling cursors is tough - they are very much session-level objects, so even if we, say, pinned your client while it uses that cursor, which would work, that would decrease the performance of connection pooling overall.

So, what's better, breaking your app initially so you know to remove that feature, or letting it work silently while the connection pool isn't 100% in transaction mode? Tough call.
levkk
·3 日前·議論
I don't think so. Too much trouble. Caching is a really hard problem without context, and the context, typically, is app-specific.
levkk
·3 日前·議論
From the strictest CAP theorem definition, that's correct, it is not. But, it's pretty close. I know that in the database world, that's not a good answer, but in practice, it will deliver the vast majority of messages, so maybe that's good enough? We'll see.

We show that it's possible to come close without breaking the DB or the app, but I suspect, it's not quite yet at the level you'd expect from a _durable_ work queue, e.g., Kafka. Not going to replace that one anytime soon.
levkk
·8 日前·議論
Very cool. At first, I thought it was yet another LLM-generated demo, but no: original work of art. Super cool. Transpiling into C does seem easier than LLVM IR, and letting GCC optimize seems like this might actually work.

Excited to see the compiler implementation when it's out -- a lot to learn from.
levkk
·9 日前·議論
I cancelled Claude. The harness is kinda broken, GPT 5.5 is good, and GLM 5.2/Deepseek is good too (with pi, especially). Just not worth the trouble. And I'm not going to pay two subscriptions.
levkk
·26 日前·議論
CRUD apps don't usually delete in bulk. It's also hard to structure partitions in a way that doesn't wipe out months of important business data -- this is why teams often ETL their DB into Snowflake/ClickHouse and only then drop partitions. That makes it hard for the app to use that data again.

The better approach is either to change your storage engine (e.g. OrioleDB is working on adding the undo log to Pg), or to shard which distributes the vacuum load across multiple servers.
levkk
·28 日前·議論
You can have multiple. All sharding is config-based, so no real-time synchronization is required.
levkk
·28 日前·議論
This just checks if the package is installed, not if the installed version is infected. Presumably, if you (me...) haven't run `yay -Syu` in a while (months), we're fine, right? ...Right?

Goddamit, don't make me reinstall Arch, took me a week last time.

Update: archinstall rocks, back in business after like 15min.
levkk
·30 日前·議論
I didn't realize there are _any_ managed providers of PgDog out there...do tell!
levkk
·30 日前·議論
Awesome, glad it worked!
levkk
·30 日前·議論
We also do that! But it's not well documented at the moment.
levkk
·30 日前·議論
Thanks! Glad we made it relatively easy to migrate!
levkk
·30 日前·議論
For sure. They should be used for "metadata"-style tables only. High throuput writes should be direct-to-shard.
levkk
·30 日前·議論
Yeah good callout. We'll add rendezvous soon enough. Until then, being compatible with Postgres partitions has been advantageous -- while we build everything out, people were able to migrate to PgDog for the query routing layer while doing the resharding in Postgres.

Adding a sharding function in our architecture is relatively straightforward. We also support plugins which can control the flow (and direction) for queries, so our users can add their own (and they do!).
levkk
·先月·議論
Not yet, but actively working on this as we speak.
levkk
·先月·議論
fwiw, we support cross-shard transactions. They are not magic though, just good old 2pc and a bit of coordination.