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

Unoffice Hours Webring

https://unofficehours.com/
1•hunvreus•1m ago•0 comments

The Zero-Bullshit Protocol – Hallucination-Proof AI Engineering System

https://gracefultc.gumroad.com/l/ctgyvz
1•Thugonerd•2m ago•1 comments

Show HN: I Spent 200 Hours Compiling These Open Source Reviews

https://opensourcereviews.github.io/
1•honestabraham•3m ago•0 comments

Recoll command execution performance (2024)

https://www.recoll.org/pages/idxthreads/forkingRecoll.html
1•bariumbitmap•4m ago•1 comments

Healthcare corporations spent trillions of dollars on payouts to shareholders

https://lowninstitute.org/healthcare-corporations-spent-trillions-of-dollars-on-payouts-to-shareh...
1•nl•4m ago•0 comments

The Midnight Movie, Reborn

https://animationobsessive.substack.com/p/the-ultimate-midnight-movie-reborn
1•ani_obsessive•7m ago•0 comments

I just want working RCS messaging

https://wt.gd/i-just-want-my-rcs-messaging-to-work
1•joecool1029•8m ago•0 comments

Kryptos K4 summary and final guesses video

https://www.youtube.com/watch?v=O11UBt4j8TI
1•elahieh•11m ago•0 comments

Cloudflare outage on November 18, 2025 – Caused by single .unwrap()

https://old.reddit.com/r/rust/comments/1p0susm/cloudflare_outage_on_november_18_2025_caused_by/
1•manaskarekar•11m ago•0 comments

Adaptations of Yesterday by the Beatles

https://secondhandsongs.com/performance/1409/all
1•bariumbitmap•11m ago•1 comments

3.5B Accounts: Complete WhatsApp Directory Retrieved and Evaluated

https://www.heise.de/en/news/3-5-Billion-Accounts-Complete-WhatsApp-Directory-Retrieved-and-Evalu...
2•therealmarv•16m ago•0 comments

Meta's Crime Empire [video]

https://www.youtube.com/watch?v=z8wdS7TTw2w
3•locusm•17m ago•0 comments

A Month of Chat-Oriented Programming

https://checkeagle.com/checklists/njr/a-month-of-chat-oriented-programming/
1•signa11•20m ago•0 comments

The Fate of Data Model Dependency

https://medium.com/@HobokenDays/the-fate-of-shared-data-model-cf8a3dc88ac9
1•steven86•21m ago•0 comments

Neopets.com Changed My Life (2019)

https://annastreetman.com/2019/05/19/how-neopets-com-changed-my-life/
1•bariumbitmap•25m ago•0 comments

GOP overhaul of broadband permit laws: Cities hate it, cable companies love it

https://arstechnica.com/tech-policy/2025/11/gop-overhaul-of-broadband-permit-laws-cities-hate-it-...
5•duxup•27m ago•0 comments

Why mysterious structures within Earth's mantle hold clues to life here

https://phys.org/news/2025-11-mysterious-earth-mantle-clues-life.html
2•wglb•29m ago•1 comments

Strace-macOS: A clone of the strace command for macOS

https://github.com/Mic92/strace-macos
2•signa11•31m ago•0 comments

Everything You Learned About Genetics Is Wrong [video]

https://www.youtube.com/watch?v=fh9xTJQSFmE
1•gmays•33m ago•0 comments

Show HN: Free Online Pie Chart Generator and Maker

https://piechartgenerator.co
2•niliu123•33m ago•0 comments

Russia Outproduces NATO: Why Russia Has Won the War in Europe

https://aaronlee.substack.com/p/russias-total-victory-over-nato-all
3•aajailee•33m ago•0 comments

Poland Repurposed a Nazi Factory Site to Make TNT to Drop on Gaza

https://www.dropsitenews.com/p/polish-company-nitro-chem-tnt-us-mk-80-israel-gaza-nazis
5•cramsession•44m ago•0 comments

Former Obama speechwriter Sarah Hurwitz attacks social media

https://twitter.com/infolibnews/status/1990634043218534790
2•cramsession•46m ago•0 comments

I built a WhatsApp AI assistant that processes images, voice notes, and PDFs

https://github.com/elizabethfuentes12/rag-postgresql-agent-bedrock
2•elizabeth1212•47m ago•1 comments

Founder of ADHD Startup Is Found Guilty of Conspiracy in Adderall Case

https://www.wsj.com/us-news/law/adhd-startups-founder-is-found-guilty-of-conspiracy-in-adderall-c...
2•tortilla•50m ago•0 comments

Dead Code Podcast: Ground Zero-Cost Bindings (With Josh Vlk)

https://shows.acast.com/dead-code/episodes/ground-zero-cost-bindings-with-josh-vlk
1•jderochervlk•50m ago•0 comments

Generative UI

https://research.google/blog/generative-ui-a-rich-custom-visual-interactive-user-experience-for-a...
1•panarky•50m ago•1 comments

'Self-host it' is not the answer (2022)

https://neilzone.co.uk/2022/07/self-host-it-is-not-the-answer/
3•devonnull•51m ago•0 comments

iPhone 17 vs. iPhone 16 N1 Wi-Fi Speeds

https://www.macrumors.com/2025/11/18/ookla-apple-n1-chip-iphone-17-wifi-study/
2•mgh2•52m ago•0 comments

A woman who discovered the first black hole

https://badastronomy.beehiiv.com/p/the-woman-who-discovered-the-first-black-hole
5•jethronethro•53m ago•1 comments