frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Watch NHL App: How to Stream Live Hockey Games on Your Phone

https://layerseven.tv/
1•hunter_lewis754•1m ago•0 comments

Show HN: Daymo – calendar app with a new day list layout

https://daymo.flown.io
1•simongbe•1m ago•0 comments

Is AI Capable of Novelty?

1•sarmadgulzar•3m ago•0 comments

Show HN: PasteDB – A Feature-Rich Pastebin

https://pastedb.netlify.app/
1•aditya4113•5m ago•0 comments

Show HN: Take, a Mac screen recorder that comes out edited

https://crestnotch.app/take
1•zack40x•5m ago•0 comments

Show HN: Secure Bearer JWT and JWKS pattern for headless AI agents (MCP #824)

https://github.com/orgs/modelcontextprotocol/discussions/824
1•MawyxxY•6m ago•0 comments

A revolutionary take on desalination [video]

https://www.youtube.com/watch?v=0DzLiKUpkr0
1•thelastgallon•7m ago•0 comments

Psi+ 1.5.2142.0 Installer Has Been Released – Qt Jabber/XMPP Omemo/OTR E2EE

https://sourceforge.net/projects/psiplus/files/Windows/Personal-Builds/KukuRuzo/
1•neustradamus•10m ago•0 comments

Pathological Science

https://en.wikipedia.org/wiki/Pathological_science
1•gyomu•10m ago•0 comments

Sabertario – a directory of 100 free courses and tutorials

https://sabertario.com/
1•Franpove•16m ago•1 comments

Methinks It Is a Weasel

https://diatone.net/methinks
1•diatone•16m ago•0 comments

Time Serving Ads to Agents

https://digiday.com/media/time-has-started-serving-ads-to-ai-agents/
1•_superposition_•16m ago•1 comments

Coldcard Mk3 security advisory: seeds from firmware 4.0.1 onward may be at risk

https://blog.coinkite.com/coldcard-mk3-seed-generation-warning/
3•nicou•19m ago•1 comments

Why the world trusts China more than America

https://www.ft.com/content/f3ad032f-3c06-4ed4-82e2-7c2e5e68af26
2•Markoff•19m ago•2 comments

Why is 'Chat Control' one of the EU's biggest digital rights fights?

https://www.euronews.com/my-europe/2026/07/28/why-is-chat-control-one-of-the-eus-biggest-digital-...
2•latexr•20m ago•0 comments

Show HN: Cursor's Tab, cursor-jump included, inside Neovim

https://github.com/teocns/neocursor.nvim
1•teocns•21m ago•0 comments

Martin Kleppmann – Local-first in an unstable world [video]

https://www.youtube.com/watch?v=--Ru7cL22rI&list=PLXxEKA_dxoH0&index=1
2•JeremyTheo•21m ago•0 comments

How the Startup Mentality Failed Kids in San Francisco

https://www.wired.com/story/willie-brown-middle-school-startup-mentality-failed/
1•FinnLobsien•21m ago•0 comments

Montana's new "right to try" law can't come soon enough for some

https://www.technologyreview.com/2026/07/31/1140945/montanas-new-right-to-try-law-cant-come-soon-...
1•joozio•23m ago•0 comments

Tokens per Second Is a Memory Bandwidth Number

https://portfolio-orcin-beta-29.vercel.app/blog/tokens-per-second-memory-bandwidth/
1•rohitghumare•23m ago•0 comments

AI Firms Are Buying Up Old Books, Then Scanning and Destroying Them

https://novaramedia.com/2026/07/29/ai-firms-are-buying-up-old-books-then-scanning-and-destroying-...
2•trhway•23m ago•1 comments

No more zero-retention policy for OpenCode go

https://www.reddit.com/r/opencodeCLI/comments/1vbltva/no_more_zeroretention_policy_for_opencode_go/
1•gman83•24m ago•0 comments

ai calorie tracker with Mivee

https://mivee.app
1•nafas-hmn•25m ago•0 comments

An Ocean in Motion: NASA's View of Earth's Underwater Highways [video]

https://www.youtube.com/watch?v=R5-s6O8qyvE
1•simonebrunozzi•27m ago•0 comments

Show HN: MathJump – A math-based running game that requires quick calculations

https://mathjump.cc/
1•wdamao•29m ago•0 comments

VideoOnRepeat – a simple way to loop YouTube videos

https://videoonrepeat.com
1•multiplesauces•30m ago•0 comments

Show HN: Ctx traits · Turn your team skills into typed and versioned modules

https://ctx.company/traits/
1•rpunkfu•30m ago•0 comments

7 in 10 Americans say large tech companies have too much power

https://www.axios.com/2026/07/29/little-tech-big-tech-americans-power
4•mapping365•30m ago•0 comments

Friluftsliv

https://it.wikipedia.org/wiki/Friluftsliv
1•simonebrunozzi•33m ago•0 comments

Quantum Statistical Plasmonic Metacrystals

https://www.nature.com/articles/s41586-026-10782-3
1•bookofjoe•34m 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?