frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

How to think about span of control

https://www.rubick.com/span-of-control/
1•sciurus•2m ago•0 comments

Typocalypse – A free online game I made

https://typocalypse.fun/
1•Aurelius101•4m ago•0 comments

War Atlas: An interactive cartography of every named war in human history

https://waratlas.org
2•NaOH•4m ago•0 comments

SpaceX wants to launch 100k more Starlink satellites – for 100x the bandwidth

https://www.zdnet.com/home-and-office/networking/spacex-wants-to-launch-100000-more-starlink-sate...
4•CrankyBear•6m ago•0 comments

Uiua - A tacit array programming language

https://www.uiua.org/
1•weinzierl•7m ago•0 comments

Train the Agent, Then Replace It

https://allthesethings.substack.com/p/train-the-agent-then-replace-it
1•taubek•8m ago•0 comments

"Disk Not Ejected Properly": What It Means

https://bombich.com/blog/2026/07/07/disk-not-ejected-properly
1•speckx•8m ago•0 comments

Generating Effects

https://othermeans.substack.com/p/generating-effects
1•Tomte•9m ago•0 comments

Bun vs. Deno vs. Node.js 2026: Real Benchmarks Mislead

https://byteiota.com/bun-vs-deno-vs-node-js-2026-real-benchmarks-mislead/
3•h1696UOuk•9m ago•0 comments

The Work of Helping A.I. Destroy Work

https://www.nytimes.com/2026/07/10/business/ai-white-collar-jobs.html
1•apparent•10m ago•0 comments

The 2025–2026 Evolution of Generative Spatial AI

https://hal9.com/articles/the-2025-2026-evolution-of-generative-spatial-ai
1•javierluraschi•10m ago•0 comments

Alarm over launch of facial recognition in UK shops that instantly alerts police

https://www.theguardian.com/technology/2026/jul/10/facewatch-facial-recognition-uk-shops-instantl...
3•pseudolus•11m ago•0 comments

Why Stone-Faced Fascists Keep Getting Antiquity Wrong

https://www.thebulwark.com/p/why-stone-faced-fascists-keep-getting-antiquity-wrong-x-twitter-elon...
1•Tomte•14m ago•0 comments

Property Graphs in PostgreSQL

https://www.postgresql.org/docs/19/ddl-property-graphs.html
1•throwaway7783•15m ago•0 comments

Boom Prize: $750k to the first amateur RC plane that breaks the sound barrier

https://boomsupersonic.com/prize
1•dwwoelfel•15m ago•0 comments

Disable autoplay and infinite scroll or risk fines, EU tells Meta

https://arstechnica.com/tech-policy/2026/07/disable-auto-play-and-infinite-scroll-or-risk-massive...
2•OptionOfT•17m ago•0 comments

I Think I Know How to Solve the Video Game Industry's Problems

https://ggtribune.com/2026/07/10/opinion-i-think-i-know-how-to-solve-the-video-game-industrys-pro...
1•qdot76367•17m ago•0 comments

MagicView Advertising for Startups

https://www.magicview.com/
1•wesley-zheng•17m ago•0 comments

The Road to Housing Act Might Pass

https://inpractice.yimbyaction.org/p/the-road-to-housing-act-might-actually
2•viajante1882•19m ago•0 comments

China recaptures the first stage of a rocket to reuse it

https://phys.org/news/2026-07-china-page-spacex-recaptures-stage.html
2•miohtama•20m ago•0 comments

Dangerzone: Convert potentially dangerous documents into safe PDFs

https://dangerzone.rocks/
1•Cider9986•20m ago•0 comments

PQC Readiness and Migration Tool

https://postq.dev
1•PallabPaul•21m ago•0 comments

The Difference Between Watercolor and Gouache Paints

https://www.jetpens.com/blog/The-Difference-Between-Watercolor-and-Gouache-Paints/pt/963
2•ynac•21m ago•0 comments

Big Tech Doubles Debt Load to $350B in AI Spending Spree

https://www.bloomberg.com/news/articles/2026-07-10/big-tech-doubles-debt-load-to-350-billion-in-a...
2•thm•21m ago•1 comments

Hackachu: Building Pokémon-inspired games to earn hardware

https://hackachu.hackclub.com/
1•Plastuchino•22m ago•0 comments

Blood Cell 'Nurseries' Upend Understanding of Human Physiology

https://news.feinberg.northwestern.edu/2026/07/02/blood-cell-nurseries-upend-understanding-of-hum...
1•gmays•24m ago•0 comments

How to Read Scientific Papers (Or Give Good Dating Advice)

https://serenakrejcipapa.substack.com/p/how-to-read-scientific-papers-or
1•herbertl•24m ago•0 comments

Lessons from the UK's first trial scheme for electrical repairs

https://relondon.gov.uk/resources/case-study-north-london-repair-voucher-scheme-lessons-from-the-...
1•DamonHD•24m ago•0 comments

The Joy of Old-School Coding After a Stupid Mistake

https://canro91.github.io/2026/07/04/JoyOfCoding/
1•speckx•25m ago•0 comments

Ethical NBA Championships

https://pudding.cool/2026/06/ethical-champions/
1•colinprince•26m 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?