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

AI models have caught up with Unity dev

https://www.reddit.com/r/gamedev/comments/1wo5asm/ai_models_have_caught_up_with_unity_dev_my/
1•reasonableklout•52s ago•0 comments

Mechanistic reasoning in biology among elementary school children

https://www.tandfonline.com/doi/full/10.1080/10508406.2024.2432682
1•wslh•2m ago•0 comments

David Letterman meets Manny the Hippie in Haight-Ashbury (1996) [video]

https://www.youtube.com/watch?v=7QrRDUasQp8
1•MilnerRoute•2m ago•0 comments

Handwritten Notes for Friends and Machines

https://ifup.org/blog/handwritten-notes-with-friends-and-machines/
1•philips•3m ago•0 comments

AI Exec: We May Have Pulled Off "The Largest Theft of Labor in Human History"

https://www.motherjones.com/politics/2026/09/openai-chatgpt-microsoft-copyright-legal-case-docume...
2•pluc•4m ago•0 comments

Turbo Vision for Rust

https://tv.enzolombardi.net/
1•networked•5m ago•0 comments

Ask HN: Did you not get the warnings about building thinking machines in Dune?

2•roschdal•8m ago•1 comments

Video CDs Break Windows Explorer

https://clydesnotes.blogspot.com/2026/08/video-cds-break-windows-explorer.html
2•ClydeN•9m ago•0 comments

Stock Buybacks and Quarterly Thinking: How America Fell Behind in Battery Tech

https://www.ineteconomics.org/perspectives/blog/the-u-s-battery-maker-that-could-and-the-u-s-auto...
2•paimapi•12m ago•0 comments

Show HN: CaughtShipping – curfew app for developers, enforced by a public wall

https://caughtshipping.com/
1•misulicus•12m ago•0 comments

Who is going to teach the junior developers?

https://blog.luap.info/who-is-going-to-teach-junior-developers.html
6•polote•15m ago•2 comments

Seed Game

https://seed.game/early-access
2•jackhalford•15m ago•0 comments

Show HN: Shielded Bitcoin – private payments on Bitcoin, proven in the browser

https://shielded.bitcoin.pe/
1•harshjv•15m ago•0 comments

Schools for the poor are not poor schools

https://www.economist.com/united-states/2026/09/24/schools-for-the-poor-are-not-poor-schools
1•andsoitis•16m ago•0 comments

My brother's new high rise apartment doesn't allow individual internet services

https://www.reddit.com/r/mildlyinfuriating/s/mQRDnpsNvs
3•nixass•17m ago•1 comments

Show HN: Billed – a one-time-purchase invoicing app (no subscription)

https://apps.microsoft.com/detail/9nbs6t5cjpdp?hl=en-US&gl=US
1•billed•18m ago•0 comments

Goetics: On Go as a Tool for Creative Expression [video]

https://www.youtube.com/watch?v=kTcoVUEmJ4I
2•caycep0llard•19m ago•0 comments

Ask HN: Have you read the Dune books by Frank Herbert?

1•roschdal•26m ago•2 comments

Nifty little macOS toolbar tool to track daily usage

https://github.com/shrivara/token-bar
1•Hasaber8•26m ago•0 comments

Ask HN: Why doesn't Apple provide Xcode 27's markdown editor as a separate app?

2•amichail•29m ago•6 comments

Blocking Your Adblocker. How to be an asshole, programmatically

https://medium.com/@vmsp/blocking-your-adblocker-967d1c6e48f2
1•birdculture•29m ago•0 comments

The world has a grounding problem

https://aclevername.substack.com/p/the-world-has-a-grounding-problem
2•utilityhotbar•29m ago•0 comments

The tiny island where Chinese mothers travel to give birth to American babies

https://www.telegraph.co.uk/us/news/2026/09/26/saipan-birth-tourism-us-citizens/
1•cwwc•29m ago•0 comments

AMD Takes the Lid Off of Next-Gen EPYC 9006 Venice as Zen 6 Comes to Servers

https://www.servethehome.com/amd-takes-the-lid-off-of-next-gen-epyc-9006-venice-as-zen-6-comes-to...
2•rbanffy•31m ago•0 comments

Show HN: OrbitalNote – A modern desktop orgmode editor with calendar and agenda

https://orbitalnote.org/
1•mannders•36m ago•0 comments

C64 MERCENARY (1985): a novel exploit bug at the start of the game

https://gamesexplained.com/c64/mercenary/
2•a1r•39m ago•1 comments

I built my daughter a custom alarm clock because everything on Amazon sucked

https://reclaimtheday.substack.com/p/i-built-my-daughter-a-custom-smart
5•pneedleman•41m ago•3 comments

A4 paper format / International standard paper sizes (2025)

https://www.cl.cam.ac.uk/~mgk25/iso-paper.html
3•Tomte•42m ago•0 comments

Creating applications using the drag-and-drop is a pleasure

https://nimoxi.com/spikeui/
2•Caronte3D•46m ago•0 comments

ThePrimeagen Joins Omarchy

https://omarchy.org/news/2026/09/theprimeagen-joins-omarchy-core/
4•mellosouls•47m ago•0 comments