News for hackers. Stuff that matters.
Re:Ask HN: How do you test SQL? by olau on Wednesday February 01, 2023 @02:12AM (#34607444)
On Postgres you can run

SET SESSION synchronous_commit TO OFF;

(Update: I just looked in our test code, you can also replace the CREATE TABLE commands with "CREATE UNLOGGED TABLE" to disable write-ahead logging.)

There are possibly other tricks?

I slightly disagree with the tech debt comment, though. If you get a huge speed up, it may be worth paying for the occasional bug, depending on the circumstances. Or you could do both, and only run the test on Postgres occasionally.

There are no comments on this comment yet.