frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

3•polishdude20•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

Online Documentation for Qt 6, KDE Frameworks, etc. for C and Zig

https://gist.github.com/rcalixte/63757948a7bf4190b469ff09c5ad7a67
1•rcalixte•1m ago•0 comments

How to Learn Something New

https://newsletter.bphogan.com/archive/issue-47-a-personal-learning-plan/
1•mooreds•2m ago•0 comments

Foundry IQ: a knowledge layer for agents

https://techcommunity.microsoft.com/blog/azure-ai-foundry-blog/foundry-iq-unlocking-ubiquitous-kn...
1•pmc00•2m ago•0 comments

Tell HN: Taking a Time Capsule Through HN

1•chistev•3m ago•0 comments

Husband and wife accused of using spycam and earpieces to win almost £600k at

https://www.bbc.co.uk/news/articles/c075zd0j2j3o
2•chrisjj•8m ago•0 comments

Aristotle from Harmonic has solved this Erdos problem

https://www.erdosproblems.com/forum/thread/124#post-1892
1•cjbarber•8m ago•0 comments

Git Your Freedom Back: A Beginner's Guide to Sourcehut

https://btxx.org/posts/beginners-guide-sourcehut/
1•zdw•13m ago•0 comments

Janissary

https://en.wikipedia.org/wiki/Janissary
1•simonebrunozzi•13m ago•0 comments

Show HN: Memory Lane – bootstrap your naive Claude instances with their history

https://github.com/jMyles/memory-lane
1•jMyles•17m ago•1 comments

The Value of the Physical World in an AI-Obsessed Era

https://ana15.substack.com/p/playing-to-your-strengths
1•ana15•18m ago•0 comments

Hereford man jailed over extreme right-wing music

https://www.bbc.com/news/articles/cg4n5k2lq7no
1•Jigsy•20m ago•0 comments

RIP Twitter API: A eulogy to its vast research contributions

https://arxiv.org/abs/2404.07340
2•Anon84•21m ago•0 comments

Non-quantum structural entanglement: a new model of system linking

https://zenodo.org/records/17710529
1•flexionU•23m ago•0 comments

Abstract Wikipedia

https://en.wikipedia.org/wiki/Abstract_Wikipedia
2•evah•24m ago•0 comments

The Kids Will Be Alright

https://ben-mini.com/2025/the-kids-will-be-alright
2•bewal416•24m ago•0 comments

PostgreSQL's Index Monitoring with Pg_stat_insights

https://www.pgelephant.com/blog/pg-stat-insights-index-monitoring
1•pgelephant2025•24m ago•0 comments

ChatGPT launched three years ago today

https://techcrunch.com/2025/11/30/chatgpt-launched-three-years-ago-today/
3•frays•25m ago•0 comments

Now Poorer Countries Are Shutting the Door on Refugees Too

https://www.wsj.com/world/africa/now-poorer-countries-are-shutting-the-door-on-refugees-too-932d42eb
2•JumpCrisscross•26m ago•0 comments

Am I Wrong?

1•jazzm•27m ago•2 comments

"Boobs check" verify if sites behind CDN are hosted in Inside Iran or not

https://twitter.com/hkashfi/status/1995109785679573167
4•defly•27m ago•0 comments

Data Centers Are a 'Gold Rush' for Construction Workers

https://www.wsj.com/business/data-centers-are-a-gold-rush-for-construction-workers-6e3c5ce0
3•JumpCrisscross•29m ago•0 comments

Show HN: Thermodynamic Alignment Forces Gemini Thinking into "Burn Protocol"

https://github.com/CodeIncept1111/Sovereign-Stack
1•CodeIncept1111•31m ago•1 comments

18 Months of Events Fit on Four Floppy Disks

https://docs.eventsourcingdb.io/blog/2025/12/01/18-months-of-events-fit-on-four-floppy-disks/
1•goloroden•31m ago•0 comments

How to run phones while being struck by suicide drones

https://nasa.cx/hn/posts/how-to-run-hundreds-of-phones-while-being-struck-by-suicide-drones/
31•nasaok•32m ago•11 comments

PowerShell's curl can run JavaScript [video]

https://www.youtube.com/watch?v=KJKnEd6_WlI
1•mathiasdpx•32m ago•0 comments

Particle Physicists Detect 'Magic' at the Large Hadron Collider

https://www.quantamagazine.org/particle-physicists-detect-magic-at-the-large-hadron-collider-2025...
1•tzury•35m ago•0 comments

White House gives Maduro ultimatum as U.S. moves toward land operations

https://www.miamiherald.com/news/nation-world/world/americas/venezuela/article313261442.html
3•clanky•36m ago•0 comments

Switzerland votes decisively against inheritance tax

https://www.economist.com/europe/2025/11/30/switzerland-votes-decisively-against-inheritance-tax
2•vinni2•38m ago•0 comments

Show HN: Generate Storyboards with Nano Banana from the CLI

https://github.com/kierangilliam/storyboard
2•kierangill•38m ago•0 comments

Who Will Observe the Observability? eBPF Performance at Scale

https://blog.zmalik.dev/p/who-will-observe-the-observability
1•tanelpoder•38m ago•0 comments