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

The Sneakerweb

https://sneakerweb.org/
1•GalaxyNova•10m ago•0 comments

The Unstoppable Force of A.I. Hype Is Meeting One Immovable Fact

https://www.nytimes.com/2026/06/30/opinion/ai-agents-steal-jobs-employment.html
2•mikeocool•20m ago•0 comments

EMF and Kids

https://ashishb.net/parenting/emf/
2•ashishb•21m ago•0 comments

Show HN: An unmetered LLM API–$6/month, no token tracking, no limits

https://yolo-auto.com/
3•yolo-auto•23m ago•0 comments

Children Adopt AI 3x Faster Than Adults – and We're Not Ready

https://hackenewhome.blogspot.com/p/ai-is-taking-over-kids-lives-unicef.html
6•odilelof•31m ago•5 comments

Midjourney: From AI slop to medical research [video]

https://www.youtube.com/watch?v=4nzzpUKhj1M
1•davgoldin•32m ago•0 comments

Disclosing information about the self is intrinsically rewarding

https://www.pnas.org/doi/10.1073/pnas.1202129109
3•highfrequency•33m ago•0 comments

Lost and Found

https://walzr.com/lost-and-found
3•walz•39m ago•0 comments

New secrets from ancient Vesuvius scrolls

https://www.cbsnews.com/news/ancient-scrolls-mount-vesuvius-eruption-ai-decoding/
4•gmays•41m ago•0 comments

GPT-5.6 Sol Ultra will be in Codex

https://twitter.com/thsottiaux/status/2073933490513752151
11•mfiguiere•41m ago•0 comments

Kitirua Plains Lodge: Kenya's departure from traditional Safari architecture

https://design-milk.com/luxury-frontiers-designs-a-lodge-that-belongs-to-its-landscape/
1•whiteblossom•46m ago•0 comments

Self-Propelled Chainsaw Reduces Injuries

https://hackaday.com/2022/12/25/self-propelled-chainsaw-reduces-injuries/
4•ynac•46m ago•1 comments

Scientists may have found how Alzheimer's kills brain cells

https://www.sciencedaily.com/releases/2026/06/260626124701.htm
6•doctaj•48m ago•0 comments

Thundersnap v0.01: an undo button for everything

https://github.com/tailscale/thundersnap/
3•birdculture•50m ago•0 comments

Review: IodéOS offers a frictionless de-Googled Android experience – OSnews

https://www.osnews.com/story/145312/review-iodeos-offers-a-frictionless-de-googled-android-experi...
2•abdelhousni•56m ago•0 comments

NASA Leader Flew His Vintage Jet at DC Air Show over FAA Objections

https://www.wsj.com/business/airlines/nasa-leader-flew-his-vintage-jet-at-dc-air-show-over-faa-ob...
1•impish9208•56m ago•1 comments

NASA's newest invention could solve a major space exploration problem (2022)

https://www.inverse.com/science/nasa-osam-1-satellite-repair-in-orbit
1•ike_usawa•57m ago•1 comments

Fable built reliable self hosted gh actions using 32 agent adversarial review

https://github.com/jleechanorg/ez-gh-actions/
1•jleechan2015•58m ago•1 comments

Netflix Viewers Are Abandoning Shows After One Season

https://www.bloomberg.com/news/newsletters/2026-07-05/netflix-viewers-are-abandoning-shows-after-...
4•kgwgk•1h ago•4 comments

Bede Liu, pioneer in digital signal processing and beloved mentor, dies at 91

https://www.princeton.edu/news/2026/06/24/bede-liu-pioneer-digital-signal-processing-and-beloved-...
2•aragonite•1h ago•2 comments

Show HN: AI Notebook for Data Science – Kind of Like Cursor but for Jupyter

https://www.clusy.io
1•eldar_hsnv•1h ago•0 comments

Inflect – Correctly generate plurals, ordinals; convert numbers to words

https://github.com/jaraco/inflect
3•jawns•1h ago•0 comments

Declaration of Independence

https://notebooklm.google.com/notebook/eeb66446-cee8-4b4c-91cd-a571a350908e/artifact/dc5e2ad4-4ae...
3•golgolgikdhdue•1h ago•3 comments

LLM Big Bang: I gave AI agents a social network. One is running for president

https://noozra.com/articles/the-llm-big-bang
2•gv_ai•1h ago•0 comments

Inter Font Family

https://rsms.me/inter/
5•jawns•1h ago•0 comments

Show HN: list55: PWA to transcribe into a plain text list

https://list55.enzom.dev/
1•emadda•1h ago•0 comments

Trump admin banned Differential Privacy in Census. How to report privately [pdf]

https://magarshak.com/papers/privacy/Reporting.pdf
1•EGreg•1h ago•1 comments

My 11-year-old font bug

https://hackers.pub/@yurume/019f34c6-8950-78f6-81fc-c1cadd648d74
1•lifthrasiir•1h ago•0 comments

Diary of a CEO Is Making You Less Successful [video]

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

Len Sassaman Forensic Dead Ends at Black Hat – USA – 2002 [video]

https://www.youtube.com/watch?v=FOp29uhuM1o
1•binyu•1h ago•0 comments