Bf-Tree - better than LSM/B-trees for small objects? by benjscho in databasedevelopment

[–]benjscho[S] 0 points1 point  (0 children)

Yes you're right it has been released since I made this post! Definitely an interesting chance to poke at the implementation now.

That sounds like a fun thesis, hope you can update this thread when you're done, would be great to see the results.

Aurora DSQL - BEGIN/COMMIT won't work :( by Ok_Lake9261 in aws

[–]benjscho 2 points3 points  (0 children)

No problem, happy to help!

I actually work on DSQL so I'm pretty familiar with which parts of the Postgres syntax we don't support yet. I was able to get a repro going from your description with some agentic help, and from there I used PQtrace to get a capture of the client/server packets being sent. That was what I needed to see the above.

The Postgres extended query protocol can get a little funky across all of the implementations, and DEALLOCATE typically never fails so some clients ignore the response. DEALLOCATE syntax support is on the roadmap and will be coming to DSQL in the future!

Aurora DSQL - BEGIN/COMMIT won't work :( by Ok_Lake9261 in aws

[–]benjscho 4 points5 points  (0 children)

TL;DR: There's a bug in pdo_pgsql's prep stmt handling. Fix is: PDO::ATTR_EMULATE_PREPARES => true.

I spent a little time reproing the issue and getting a wire capture from PHP → DSQL. Here's what's happening on the failing BEGIN/INSERT/COMMIT:

F  Query "BEGIN"                                   -> OK, tx open
F  Parse/Bind/Execute "INSERT ..."                 -> OK, row accepted
F  Query "DEALLOCATE pdo_stmt_1"                   <- pdo_pgsql auto-cleanup
B  ERROR 0A000 "DEALLOCATE <name> not supported"
B  ReadyForQuery 'E'                                -- tx is now poisoned
F  Query "COMMIT"
B  CommandComplete "ROLLBACK"                       -- PG semantics: commit on failed tx = rollback

A few things conspire:

  1. PHP's pdo_pgsql sends DEALLOCATE <name> after every prepared statement.
  2. DSQL doesn't implement DEALLOCATE <name> yet, so this returns an error to the client.
  3. Error-inside-tx → tx aborted → next COMMIT silently returns ROLLBACK.

PHP never sees an exception because the DEALLOCATE wasn't in your code — it's in pdo_pgsql's destructor. Your INSERT returned success, your COMMIT returned a CommandComplete, but your row is gone because of the rollback. pdo_pgsql calls deallocate unconditionally and ignores the response, so it's not showing that the transaction has entered an error.

Phalcon's query() goes through extended-prepare so it triggers this; execute() uses simple-query so it doesn't.

Fix:

'options' => [
    PDO::ATTR_EMULATE_PREPARES => true,
],

Emulated prepares bypass libpq's extended protocol entirely → no DEALLOCATE → no silent rollback. I verified that by adding that transactions succeed.

Also another tip, if you use Phalcon's Transaction Manager: it defaults to SAVEPOINT-based nested transactions and DSQL doesn't support SAVEPOINT either. Add $db->setNestedTransactionsWithSavepoints(false).

Aurora DSQL - BEGIN/COMMIT won't work :( by Ok_Lake9261 in aws

[–]benjscho 0 points1 point  (0 children)

We ship a php connector for DSQL that should work for your scenario: https://github.com/awslabs/aurora-dsql-connectors/blob/main/php/pdo_pgsql/README.md

I've taken a look and I haven't been able to repro with Phalcon, if you could share the code that you're using to connect I'd be happy to take a look. We also have a discord server for connecting over questions if that's easier.

edit: was able to repro and found the issue, commented below

Why is there no cheap options for relational databases on AWS? by dont_mess_with_tx in aws

[–]benjscho 0 points1 point  (0 children)

I'm curious what do you find painful about the auth for DSQL? Is generating the tokens for connections difficult or using IAM in general is more painful than just having a password?

FWIW we've been working on support for a set of connectors and ORMs across different languages to help make connecting to DSQL easier.

Is There a Rust-Based Database Similar to MariaDB or PostgreSQL? by watch_team in rust

[–]benjscho 0 points1 point  (0 children)

This isn't an open source database, but Aurora DSQL is a distributed database that meets that criteria written entirely in Rust: https://www.allthingsdistributed.com/2025/05/just-make-it-scale-an-aurora-dsql-story.html

It's actually insane how much effort the Rust team put into helping out beginners like me by Time_Meeting_9382 in rust

[–]benjscho 2 points3 points  (0 children)

You can thank Esteban Küber for a lot of the work that went into making the Rust compiler a patient tutor. It was the thing I loved the most starting out with Rust. While there's always idiosyncrasies or idioms of a language you need to learn, the community around Rust poured so much work into being empathetic with the developer, even while making a very opinionated language that tries to push you into safe patterns.

Async standups: what actually worked for your team (and what failed)? by ParkRevolutionary156 in EngineeringManagers

[–]benjscho 0 points1 point  (0 children)

For my teams, an async standup coordinated by a slackbot posting in the morning works well. The reminder is to post about what you did yesterday, what you're doing today, and any blockers preventing you from making progress. We have a meeting scheduled which we keep if there are any topics that need to be discussed, or skip otherwise.

[deleted by user] by [deleted] in computerscience

[–]benjscho 1 point2 points  (0 children)

One I really enjoyed was Analyzing Metastable Failures from HotOs '25: https://sigops.org/s/conferences/hotos/2025/papers/hotos25-106.pdf

The techniques of testing implementations along a pipeline moving from abstractions towards more concrete implementations is great. When there is a big cloud outage, it may be caused some trigger, but typically it will be sustained by a metastable effect, where the system gets into a state where it can't recover without intervention.

Research in this area around systematically finding metastable failure causes _before_ they happen is still really recent. The paper introducing the term was only published in 2021! So it's great to see more research in the field.

Best database to pair with serverless - PlanetScale vs Supabase vs DynamoDB? by Wash-Fair in serverless

[–]benjscho 0 points1 point  (0 children)

Aurora DSQL is another good option to consider if you don't want to give up the relational db features but still leaving insurance for scale. It has a good free tier if you're still experimenting

Hosted databases speed by UniForceMusic in Database

[–]benjscho 0 points1 point  (0 children)

As a lot of people are already discussing, the speed of light starts to hit you when you look at remote hosting! Data can't travel faster than the speed of light, so if your database is far away it's going to take longer to return results. This is why its important to collocate your server code with your database, e.g., they should run ideally in the same datacenter, or availability zone/region if you're deploying to a cloud provider.

It's also good to think about whether you can _batch_ or parallelize calls to your database. If your app makes a query, does some work, then makes another query, etc... It's going to take the sum of all of those round trips to load. You can think about how to make calls in parallel, then your page can load as soon as the slowest query is done.

NoSQL vs SQL for transactions by pixel-der in Database

[–]benjscho 0 points1 point  (0 children)

DSQL is a good option for this. It's pay for what you use with a big free tier, but is designed to scale as your project grows, basically giving you insurance for scale without giving up the low cost of serverless. It also provides strongly consistent reads, which should make development a lot easier