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

Crystals found inside wreckage from the first nuclear bomb test

https://www.scientificamerican.com/article/strange-crystals-found-inside-wreckage-from-the-first-...
1•jumploops•2m ago•0 comments

Google explains why some new Gmail accounts only get 5GB storage

https://www.androidauthority.com/google-free-15gb-gmail-storage-ending-explanation-3667360/
1•sumanep•3m ago•0 comments

World’s first native color LiDAR gives machines human-like vision

https://newatlas.com/technology/ouster-rev8-native-color-lidar/
1•breve•4m ago•0 comments

We built an agent specialized for CI (using the 3 Claude models)

https://www.mendral.com/blog/same-llm-different-agent
1•shad42•6m ago•0 comments

I recreated the experience of reading the morning sports section

https://thesportspage.app
1•anjrued•11m ago•1 comments

ExploitGym: Can AI agents turn bugs into exploits?

https://arxiv.org/abs/2605.11086
1•p_stuart82•15m ago•0 comments

The main thing about P2P meth is that there's so much of it (2022)

https://dynomight.net/p2p-meth/
2•tomjakubowski•19m ago•0 comments

Context Forking to Save Time, Tokens and Trouble

https://www.humanlayer.com/blog/context-forking-to-save-time-trouble-and-tokens
2•0xblacklight•20m ago•0 comments

Show HN: Pico-intl – Type-safe internationalization with CLI localization gates

https://github.com/Elioz404/pico-intl
2•Elioz404•22m ago•0 comments

Gas Stations Under Attack

https://www.newsweek.com/iran-hacking-tank-readers-us-gas-stations-report-11957814
3•yoloman2•22m ago•0 comments

Erlang/OTP 29.0

https://www.erlang.org/news/188
2•pyinstallwoes•23m ago•0 comments

Urlsify.com Free (forever) Link shortener with Analytics

https://old.reddit.com/r/startups_promotion/comments/1te5th8/urlsifycom_free_forever_link_shorten...
1•godlymod•25m ago•0 comments

Broken windows theory

https://en.wikipedia.org/wiki/Broken_windows_theory
1•Austin_Conlon•26m ago•0 comments

Ghost Job Detector – AI that decodes fake job posts and HR lies

https://ghost-job-detector-rlcx.vercel.app/
1•aliabdm•27m ago•0 comments

NASA-cleanroom microbial isolates survival in simulated space/Martian conditions

https://journals.asm.org/doi/10.1128/aem.02065-25
1•bookofjoe•27m ago•0 comments

Colorado governor commutes sentence of election denier Tina Peters

https://www.theguardian.com/us-news/2026/may/15/colorado-governor-tina-peters
2•asib•32m ago•0 comments

SQL patterns I use to catch transaction fraud

https://analytics.fixelsmith.com/posts/sql-fraud-patterns/
2•redbell•34m ago•0 comments

Shell RT

https://github.com/wgallios/shell-rt
2•wgallios•36m ago•0 comments

How Diamonds Are Made

https://diamond.jaydip.me/
1•lemonberry•38m ago•0 comments

Striking New Views of the First Atomic Bomb Test

https://spectrum.ieee.org/trinity-nuclear-test
2•lemonberry•39m ago•0 comments

Google tests 5 GB cap for users who skip phone numbers

https://www.theregister.com/personal-tech/2026/05/15/google-tests-5-gb-cap-for-users-who-skip-pho...
3•jnord•41m ago•0 comments

Tuwunel – Matrix Chat and Voice/Video/Screen Conferencing for Groups

https://docs.zeropolis.net/doku.php/tech:tuwunel
1•unethical_ban•41m ago•1 comments

Datacenters slurping juice help drive 75% jump in PJM power prices

https://www.theregister.com/on-prem/2026/05/15/datacenters-slurping-juice-help-drive-75-jump-in-p...
3•jnord•41m ago•0 comments

Spectre Programming Language

https://spectre-docs.pages.dev
3•asdkop•42m ago•0 comments

OnlyCats – TikTok for Cats

https://onlycats.cc
19•stagas•43m ago•4 comments

Ask a Foolish Question

https://www.gutenberg.org/cache/epub/33854/pg33854-images.html
1•orsenthil•43m ago•1 comments

Show HN: WolfSPDM a embedded focused requester SPDM 1.2 Stack built on WolfSSL

https://github.com/aidangarske/wolfSPDM
1•aidangarske•45m ago•0 comments

Programming Z3

https://z3prover.github.io/papers/programmingz3.html
2•RohanAdwankar•45m ago•0 comments

Upgrade Symfony 2.8.x to 7x Prime v2.9.0.0 – Tested With PHP 8.5.6

https://blog.se7enx.com/7x-releases-7x-prime-v2-9-0-0-the-symfony-v2-drop-in-upgrade-to-php-8-sup...
1•7x•46m ago•0 comments

Comments Are More Important Than Code–Jef Raskin (2005)

https://queue.acm.org/detail.cfm?id=1053354
1•danhite•47m ago•1 comments