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

The Digital Ouija Effect – Emergent Behavior in AI Models

https://kennethreitz.org/essays/2026-04-17-the_digital_ouija_effect
1•txtsd•1m ago•0 comments

Why AI Needs a Sense of Smell

https://www.noemamag.com/why-ai-needs-a-sense-of-smell/
1•tintinnabula•2m ago•0 comments

India drops proposal to mandate national ID app on smartphones after pushback

https://www.reuters.com/world/china/india-drops-proposal-mandate-national-id-app-aadhaar-smartpho...
1•Cider9986•5m ago•0 comments

Google Told to Share Search Data with AI Rivals in EU Proposal

https://www.bloomberg.com/news/articles/2026-04-16/google-told-to-share-search-data-with-ai-rival...
1•1vuio0pswjnm7•6m ago•0 comments

Brave Origin Released

https://support.brave.app/hc/en-us/articles/38561489788173-What-is-Brave-Origin
1•Cider9986•7m ago•0 comments

Anthropic Nerfed Opus 4.6 Before the 4.7 Launch

https://fagnerbrack.com/how-anthropic-nerfed-opus-4-6-before-the-4-7-launch-c932e383f4f6
2•fagnerbrack•12m ago•1 comments

Exposing the flaw in tap to pay [video]

https://www.youtube.com/watch?v=PPJ6NJkmDAo
1•teleforce•13m ago•0 comments

In this U.S. hot spot for data centers, voters have turned against them

https://www.washingtonpost.com/business/2026/04/15/data-centers-poll-virginia/
1•1vuio0pswjnm7•14m ago•0 comments

OpenAI loses multiple executives in latest leadership shakeup

https://www.cnbc.com/2026/04/17/openai-executives-leave.html
1•1vuio0pswjnm7•17m ago•0 comments

The FBI Director Is MIA

https://www.theatlantic.com/politics/2026/04/kash-patel-fbi-director-drinking-absences/686839/
2•osnium123•19m ago•0 comments

Trump's 'Triumphal Arch' Is Vastly Larger Than Other Washington Monuments

https://www.bloomberg.com/news/articles/2026-04-16/trump-s-triumphal-arch-takes-a-step-toward-app...
1•wslh•20m ago•0 comments

WordPress Security Checklist: 15 Checks That Matter (and 12 That Don't)

https://novaheaven.io/en/novapulse/wordpress-security-checklist-that-matters
1•SephX•22m ago•0 comments

Single-nucleus profiling of the CNS unveils epigenetic memory of development

https://www.nature.com/articles/s41593-026-02208-0
1•PaulHoule•25m ago•0 comments

A story about how I dug into the PostgreSQL sources to write my own WAL receiver

https://medium.com/@mailbox.sq7/a-long-story-about-how-i-dug-into-the-postgresql-source-code-to-w...
1•alzhi7•25m ago•0 comments

Show HN: Sfsym – Export Apple SF Symbols as Vector SVG/PDF/PNG

https://github.com/yapstudios/sfsym
2•olliewagner•28m ago•0 comments

Output Isn't Design

https://twitter.com/karrisaarinen/status/2045257582470983691
1•azhenley•31m ago•0 comments

LLM wiki daemon with per-wiki filesystem isolation

https://github.com/wastedcode/memex
2•zeppelin_7•36m ago•0 comments

Why hasn't AI improved design quality the way it improved dev speed?

https://starzup.vercel.app/
1•ashleyvarghesee•47m ago•3 comments

Eyes and ears for Karpathy's virtual brain

https://github.com/Nalin-Atmakur/hivemind
1•NalinAtmakur•57m ago•0 comments

OpenAI's Vision for the AI Economy

https://techcrunch.com/2026/04/06/openais-vision-for-the-ai-economy-public-wealth-funds-robot-tax...
4•gmays•1h ago•1 comments

Show HN: devnexus – persistent repo context for ai across sessions and engineers

https://github.com/JoshBong/devnexus
2•Joshhuang314•1h ago•0 comments

SmolBSD – build your own minimal BSD system

https://smolbsd.org/#about
1•rodrigo975•1h ago•0 comments

Deep Dive into Claude's Memory Architecture

https://twitter.com/spandan_madan/status/2045336831999475789
1•spandan_madan•1h ago•0 comments

The Abstraction Fallacy: Why AI Can Simulate but Not Instantiate Consciousness

https://deepmind.google/research/publications/231971/
2•joshus•1h ago•0 comments

Open Soucrce AI-powered screen recording

https://github.com/getcoherence/studio
3•keithfawcett•1h ago•0 comments

I built a multi-turn clinical safety eval framework for LLMs

https://medium.com/@deeps.subramaniam/part-2-what-the-numbers-say-and-why-that-matters-more-than-...
3•deepikaa_s•1h ago•0 comments

Ohio's nursing homes are dumping patients at homeless shelters

https://apnews.com/article/ohio-nursing-home-patients-homeless-shelters-9c000eeddc9c9411f44fd605f...
2•petethomas•1h ago•0 comments

Ternary Bonsai: Top Intelligence at 1.58 Bits

https://prismml.com/news/ternary-bonsai
1•nnx•1h ago•0 comments

Claude Code Model Chooser

https://bendansby.com/model-chooser.html
1•webwielder2•1h ago•0 comments

Unweight: We compressed an LLM 22% without sacrificing quality

https://blog.cloudflare.com/unweight-tensor-compression/
4•subset•1h ago•1 comments