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

No-Boilerplate, Warning-Free and Reproducible Builds on Maven 4

https://foojay.io/today/no-boilerplate-maven-4-builds/
1•lprimak•48s ago•0 comments

Upgraded Immich to Postgres 19 and VectorChord 1.5.0, works great

https://www.reddit.com/r/immich/comments/1y4ulvq/upgraded_immich_to_postgres_19_and_vectorchord/
1•lprimak•1m ago•0 comments

Gleam Case Exhaustiveness, as a Fan

https://oyster.pckt.blog/gleam-case-exhaustiveness-as-a-fan-fd4whyp
1•TheWiggles•3m ago•0 comments

Linus Torvalds: "Tell Your AI Companion to Get Its Act Together"

https://www.phoronix.com/news/Linus-Torvalds-EXT4-AI-Big
2•droidjj•4m ago•0 comments

New research suggests AI bubble bursting and to expect major market collapse

https://www.london.edu/think/ai-bubble-about-to-burst
1•nreece•6m ago•0 comments

Ask HN: What do you think of AI powered universal mind control?

1•analog8374•17m ago•1 comments

Sleep (Album)

https://en.wikipedia.org/wiki/Sleep_(album)
2•Ariarule•21m ago•0 comments

My context engineering changed for Gemini 4 Neon

https://www.philschmid.de/gemini-4-neon-context-engineering
3•gmays•28m ago•1 comments

Ayn Rand Scores the Alexander-Pinker Brawl

https://hollisrobbinsanecdotal.substack.com/p/ayn-rand-scores-the-alexander-pinker
2•HR01•31m ago•0 comments

Have they solved p vs. NP?

https://havetheysolvedpvsnp.com/?lang=en
2•akliemke•32m ago•0 comments

Every Layer Removes a Reading

https://aguilar-pelaez.co.uk/every-layer-removes-a-reading.html
1•pombo•36m ago•0 comments

Safe Studio: Visual Basic for the Web in 2027. (Happy Thanksgiving Everyone)

https://github.com/SafeScript/studio
1•EGreg•37m ago•0 comments

Show HN: EarthCiv – Civ-style maps of real countries, on one world map

https://earthciv.org
1•manpreetsgarha•42m ago•0 comments

Show HN: Brand logos as SVG/PNG with CDN links and light/dark variants

https://radianui.com/resources/brand-logos
1•Ashmit72•42m ago•0 comments

An Agentic Driven Operating System Source Code

https://github.com/vahmoh/Veda
1•saeedmh10k•44m ago•0 comments

Against the International Oligarchy

https://parismanifesto.world/en/
5•HotGarbage•48m ago•0 comments

Show HN: GravityFinder – Explore Exoplanets and More

https://gravityfinder.com
2•Trommsdorff•53m ago•0 comments

Measuring and mitigating agent sandbox escape with Siren

https://safeguards.anthropic.com/2026/siren/
2•gmays•1h ago•0 comments

Omarchy 4.6 Released with More Local AI Integration, Its Own File Manager

https://www.phoronix.com/news/Omarchy-4.6-Released
4•mikece•1h ago•0 comments

Minecraft's Reclusive Creator Has a Proposition for Anthropic

https://www.businessinsider.com/minecraft-creator-markus-persson-has-a-proposition-for-anthropic-...
3•andsoitis•1h ago•2 comments

Show HN: Pardon Me – a Thanksgiving game where you're the turkey

https://pardonme.shiptiffin.app
1•bilater•1h ago•0 comments

A Brief Walk Through Program Space: Agents and edge-case-driven development

https://neilmacintyre.com/posts/walks-in-program-space/
1•neil_macintyre•1h ago•0 comments

The Cutthroat Business of Shipwrecks

https://daily.jstor.org/the-cutthroat-business-of-shipwrecks/
3•herbertl•1h ago•0 comments

Underrated reasons to be thankful VI

https://dynomight.net/thanks-6/
2•zdw•1h ago•0 comments

What's Left for Software Developers

https://www.mooreds.com/wordpress/archives/3757
4•zdw•1h ago•1 comments

Show HN: The fastest and most accurate way to convert bank statements to Excel

https://bayainy.com/en
2•WellKnown0•1h ago•1 comments

Hard Drive pricing has gotten bad

https://blog.ktz.me/black-friday-hard-drive-prices-are-messed-up/
35•zdw•1h ago•5 comments

Trump says he 'protected' Musk in first term after 'a tough incident' – what?

https://electrek.co/2026/11/24/trump-protected-elon-musk-first-term-tough-incident/
4•FabHK•1h ago•0 comments

Bill Hicks on Marketing

https://www.youtube.com/watch?v=tHEOGrkhDp0
3•archargelod•1h ago•0 comments

CXMT Accelerates 4F² DRAM Push, Eyes Year-End Server DDR5 Rdimm Launch

https://www.trendforce.com/news/2026/10/12/news-cxmt-accelerates-4f%c2%b2-dram-push-eyes-year-end...
1•walterbell•1h ago•0 comments