frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Am I the problem? Interviewing another team to find out

https://www.macchaffee.com/blog/2026/am-i-the-problem/
1•signa11•3m ago•0 comments

What We Talk About When We Talk About Bruce Lee

https://decodingvibes.com/blog/what-we-talk-about-when-we-talk-about-bruce-lee/
1•altmanaltman•3m ago•0 comments

Shadow AI is a hidden risk to your business

https://proton.me/business/blog/shadow-ai
3•devonnull•5m ago•0 comments

I build the Tinder to choose food

https://beta.platetale.com/
1•anhyourdream•6m ago•0 comments

Anthropic Economic Index

https://www.anthropic.com/economic-index
3•ronfriedhaber•7m ago•0 comments

Swift-Gigatoken

https://github.com/1amageek/swift-gigatoken
1•frizlab•13m ago•0 comments

The Idea of an Immutable Social Media

https://citizendot.github.io/articles/the-idea-of-immutable-social-media/
3•CITIZENDOT•18m ago•0 comments

Maryland Closes More of Cunningham Falls State Park After Second Beaver Attack

https://news.maryland.gov/dnr/2026/08/05/dnr-closes-additional-areas-of-cunningham-falls-state-pa...
5•bookofjoe•19m ago•1 comments

Pneumatic tube mail in New York City

https://en.wikipedia.org/wiki/Pneumatic_tube_mail_in_New_York_City
4•gkaemmer•22m ago•0 comments

MacGregor the Bridge Builder

https://www.astralcodexten.com/p/macgregor-the-bridge-builder
1•Ariarule•23m ago•0 comments

I gave Claude complete ownership over a website

https://freebot.dev/
2•BenediktHolm•25m ago•2 comments

Attack Techniques: Fake Captive Portals

https://textslashplain.com/2026/08/03/attack-techniques-fake-captive-portals/
2•rowbin•27m ago•0 comments

Improving Heuristics

https://www.redblobgames.com/pathfinding/heuristics/differential.html
2•ingve•31m ago•0 comments

Microsoft Tells Engineers 'Tokenmaxxing Is Not What We Are Optimizing For'

https://www.404media.co/microsoft-tells-engineers-tokenmaxxing-is-not-what-we-are-optimizing-for/
3•doener•33m ago•0 comments

How to write production-quality code with AI

https://curtispoe.org/paad/
3•Ovid•35m ago•1 comments

YouTube Mistakenly Penalizes Kurzgesagt for AI-Generated Slop

https://kotaku.com/youtube-mistakenly-penalizes-popular-science-channel-kurzgesagt-for-ai-generat...
10•guilamu•38m ago•0 comments

Instagram's AI Rewards Human Attention

https://ai-updates.net/instagram-ai-human-attention-content/
2•ashurandi•38m ago•0 comments

Show HN: Live beach data for Nova Scotia

https://whenshouldigotothebeach.ca/
1•recvonline•39m ago•0 comments

Is Justified True Belief Knowledge? [pdf]

https://courses.physics.illinois.edu/phys419/sp2021/Gettier.pdf
4•jsLavaGoat•39m ago•1 comments

You have to do above average

https://kipsmiling.com/you-have-to-do-above-average-actions/
3•imsurajkadam•41m ago•0 comments

Understanding std:counting_semaphore and std:binary_semaphore from C++20

https://www.cppstories.com/2026/semaphore/
2•jandeboevrie•41m ago•0 comments

Reservation Apps Have Made Getting into a Restaurant a Nightmare

https://www.wsj.com/business/restaurant-reservation-apps-30a29e6b
2•pseudolus•41m ago•2 comments

The Right Harness Is All You Need

https://hkinsley.com/reflections/right-harness-is-all-you-need
1•bjclark•43m ago•0 comments

OpenSSH Key Structure Guide

https://sshref.dev/
2•fanf2•44m ago•0 comments

A game made of sine waves (YouTube)

https://www.youtube.com/watch?v=Qr3VsZYQy4s
1•hanifbbz•44m ago•0 comments

Abolish the Top Ten Books List

https://thewalrus.ca/abolish-the-top-ten-books-list/
2•pseudolus•46m ago•0 comments

The Unreasonable Effectiveness of Mathematics in the Natural Sciences [pdf]

https://web.njit.edu/~akansu/PAPERS/The%20Unreasonable%20Effectiveness%20of%20Mathematics%20(EP%2...
3•pseudolus•49m ago•0 comments

One of China's Most Powerful AI Models Has Also Escaped Containment

https://www.wired.com/story/moonshot-kimi-k3-ai-model-escape-sandbox/
2•gpi•49m ago•0 comments

Show HN: Per-module tags and releases for Terraform monorepos

https://github.com/techpivot/terraform-module-releaser
1•virgofx•50m ago•0 comments

Kim Jong Un Flouted Sanctions to Amass $22B Windfall

https://www.bloomberg.com/graphics/2026-north-korea-windfall/
4•paulpauper•51m ago•0 comments
Open in hackernews

Ask HN: How can I load test PostgreSQL but avoid changing actual data?

1•LawZiL•1y ago
I'm running a load test on my Node.js application and want to simulate realistic write-heavy scenarios to stress test the system — especially the PostgreSQL database.

There's a part of the code that performs UPDATE queries, but during load testing, I don't want these updates to actually change the state of the database. However, I still want the database to experience the full impact of the update — query planning, locking, I/O, WAL writes, etc. — so I can measure how it affects performance under peak load.

Is there a best-practice approach to achieve this?

So far, the most viable option I’ve found is to wrap the UPDATE queries in a transaction and then roll it back — that way, the queries still execute, but the state doesn’t change. Is this the right way to go? Does rollback introduce any performance overhead that would skew my results? Are there better or more realistic alternatives that simulate the full write path without persisting changes?

Thanks in advance!

Comments

sargstuff•1y ago
pgbench[2] / pgreplay-go[0] / python locust[1]

very old school approach:

Misuse sql VIEW[3][4] to generate a temporary parallel table setup. Testing database separate from production database would be 'better', IMHO.

-----

[0] pgreplay-go : https://github.com/gocardless/pgreplay-go

[1] python locust : https://miguel-codes.medium.com/unconventional-load-testing-...

[2] pgbench load testing :

   a) https://medium.com/@c.ucanefe/pgbench-load-test-166bdfb5c75a

   b) https://neon.tech/blog/autoscaling-in-action-postgres-load-testing-with-pgbench

   c) https://hackernoon.com/how-to-create-and-load-test-data-in-postgresql-i41e353m
----------------------------

[3] : a) https://hashrocket.com/blog/posts/materialized-view-strategi...

      b) https://tech.jonathangardner.net/wiki/PostgreSQL/Materialized_Views

      c) https://stackoverflow.com/questions/77603705/what-is-the-use-of-materialized-view-in-postgresql
[4] : https://en.wikipedia.org/wiki/View_(SQL)
LawZiL•1y ago
but again, how can i perform the query, but not actually change the state, i really need the state to keep untouched, but be able to perform the query itself.
MatthiasPortzel•1y ago
> Does rollback introduce any performance overhead that would skew my results?

I would expect it to be the other way around—since the transactions are rolled back and not committed, they would have significantly less performance impact. But I’m working from an academic model of the database.

apothegm•1y ago
Load test against a clone instead of a DB whose contents you care about?