frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

3•polishdude20•1y ago
Just joined a new company and they run a multi tenant database in postgres where each tenant is distinguished by their account ID. I'd like to be able to dump the data of a single account to my local instance to assist in debugging.

Problem is, many of the entities do not include an account ID. For example, a user can have an account ID but a user post will not but it will be tied to a user ID.

Also foreign keys aren't really implemented fully.

Are there any tools or techniques that could help make this process easier to do?

Comments

tudorg•1y ago
You can try with data subsetting tools, a few that I know are: greenmask, jailer, tonic condenser, and I think there are more. They are not exactly for your use case, but might help you a bit. The problem is most of these tools can walk foreign keys, but only in one directions.

Also, since you said FK are not fully implemented, then there just won't be enough information for them to work with. So you can either work on fixing the foreign keys or have more complex scripts.

polishdude20•1y ago
Thanks for the suggestions!

Yeah due to the unavailability of FK's, I'd have to somehow map certain ID columns to the tables they're for, accounting for slight naming convention differences.

woyten•1y ago
In case you don’t have FKs you could specify virtual foreign keys in Greenmask.

Check out docs for details

https://docs.greenmask.io/latest/database_subset/#virtual-re...

abhisek•1y ago
This is poor design. Multi-tenant data model design must have a tenant or segment ID for every tenant segmented tables. While it may not be a problem initially but as the business grows, you may need to move tenant data to separate DBs or even different regions based on compliance requirements. IMHO it is a good idea to run DB migrations and have a tenant ID populated in all tenant segmented tables
polishdude20•1y ago
Oh yes I agree with you. It may become a big push to convince my org to do that

Fan-fiction site Archive of Our Own could be offline for up to 4 weeks

https://techcrunch.com/2026/10/29/fan-fiction-site-archive-of-our-own-could-be-offline-for-up-to-...
1•windsurfer•1m ago•0 comments

There's No Such Thing as Society in the Objective Function

https://laurenleek.substack.com/p/theres-no-such-thing-as-society-in
1•sebg•3m ago•0 comments

The horse that ushered in Manchester United's 21-year tragic arc

https://www.theguardian.com/football/2026/oct/26/the-horse-that-brought-down-manchester-united
1•chistev•4m ago•0 comments

Is IT OK to Punish Female Prisoners with Injections

1•TheChimera•4m ago•1 comments

Vertical Farming: Reimagining Agriculture in an Urban Age

https://worldsensorium.com/vertical-farming-reimagining-agriculture-in-an-urban-age/
1•dnetesn•4m ago•0 comments

Are we in an AI Bubble? Lessons from 1873 and 2000

https://samissermoyer.substack.com/p/are-we-in-an-ai-bubble-lessons-from
1•greekanalyst•5m ago•0 comments

The end of startups: The coming credit crunch

https://evanjconrad.com/posts/end-of-startups
1•maxall4•5m ago•0 comments

How ancient DNA is rewriting the story of human origins

https://blue-continuum.com/our-history-written-in-dust
1•dnetesn•5m ago•0 comments

You're in a War for Your Attention. You Should Probably Wear Armor

https://www.talysman.app/blog/attention-armor
1•yauneyz•6m ago•0 comments

Digging a Secret Garage Part 8 the Last 6 Months (Colin Furze) [video]

https://www.youtube.com/watch?v=sxur0bhmkFM
1•mfrw•9m ago•0 comments

When AI Starts Writing Systems Code

https://www.coreauto.com/blog/when-ai-starts-writing-systems-code
1•skidrow•12m ago•0 comments

You Can Turn Off the New MacBook Pro's Touchscreen Functionality

https://twitter.com/viticci/status/2115524599081558016
1•throwaway270925•12m ago•0 comments

Advanced Matrix Multiplication Optimization on Nvidia GPUs

https://salykova.github.io/gemm-gpu
1•skidrow•13m ago•0 comments

Blog FlexAttention: The Flexibility of PyTorch with the Performance of FA

https://pytorch.org/blog/flexattention/
1•skidrow•14m ago•0 comments

Show HN: Resumux – TCP over WebSockets that survives the WebSocket dying

https://github.com/k4lleanka/resumux
1•k4lleanka•16m ago•0 comments

SpaceX no longer needs NASA, and that's a problem for America's space agency

https://arstechnica.com/space/2026/10/spacex-no-longer-needs-nasa-and-thats-a-problem-for-america...
4•civilchaos•20m ago•0 comments

Highway thieves are spoofing GPS to steal millions in data center-bound cargo

https://arstechnica.com/tech-policy/2026/10/highway-thieves-are-spoofing-gps-to-steal-millions-in...
3•cdrnsf•21m ago•0 comments

The Economic Organisation of a POW Camp [pdf]

https://courses.cit.cornell.edu/econ4260/out/radford_pow.pdf
2•sebg•21m ago•0 comments

Why big tech stopped building useful stuff

https://www.rubenerd.au/why-big-tech-stopped-building-useful-stuff/
6•cdrnsf•22m ago•0 comments

The Hottest New Side Hustle Is Stripping Copper Wire and Posting About It

https://www.wired.com/story/the-hottest-new-side-hustle-is-stripping-copper-wire-and-posting-abou...
4•cdrnsf•24m ago•1 comments

Building fine-grained version control for agents with Rust and Durable Objects

https://delta.dev/blog/fine-grained-version-control-for-agents
2•nsm•25m ago•0 comments

Martian meteorite found in the Sahara is 4.1B years old

https://www.reuters.com/science/martian-meteorite-found-sahara-is-41-billion-years-old-2026-10-29/
2•noideawhatididt•25m ago•0 comments

Local Decisions in DuckDB

https://altertable.ai/blog/2026-10-29-local-decisions-in-duckdb
2•altertable•25m ago•0 comments

The Battle of the Green Dot

https://malja.dev/the-battle-of-the-green-dot
2•maljacz•26m ago•0 comments

DualChem Benchmark

https://scale.com/blog/dualchem-evaluating-ai-models-dual-use-chemistry-risks
1•satirr•28m ago•1 comments

Thoughts while watching myself be automated (2024)

https://dynomight.net/automated/
1•gone35•34m ago•0 comments

A (lukewarm) defense of Minsky and Papert

https://federicomilanesio.substack.com/p/a-lukewarm-defense-of-minsky-and
1•sebg•34m ago•0 comments

LLMs bring new nature of abstraction (2025)

https://martinfowler.com/articles/2025-nature-abstraction.html
2•p2detar•34m ago•0 comments

LeadPilot

https://getleadpilot.tech/
1•ktoznet•35m ago•0 comments

Dartmouth provost resigns following accusations he used AI for writing

https://apnews.com/article/dartmouth-provost-ai-a9f71dc5e9e10461c7c2390febcd1b5a
4•nradov•36m ago•1 comments