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•10mo 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

John Deere Pays $99M to Settle 'Right to Repair' Class Action

https://www.techdirt.com/2026/04/14/john-deere-pays-99-million-to-settle-right-to-repair-class-ac...
1•cdrnsf•3m ago•0 comments

Did Taylor Swift Kill a Bunch of People?

https://www.nytimes.com/2026/04/10/well/car-crashes-streaming-friday-harvard.html
1•neehao•4m ago•0 comments

Characterizing the repeatability of cardiovascular responses to hypoxic apneas

https://physoc.onlinelibrary.wiley.com/doi/10.14814/phy2.70692
1•PaulHoule•7m ago•0 comments

Pointer-Stable Dynamic Arrays

https://vectrx.substack.com/p/pointer-stable-dynamic-arrays
1•whobre•7m ago•0 comments

NASA chose the right crew to launch a new era of human space exploration

https://arstechnica.com/space/2026/04/rockets-and-spaceships-are-cool-but-the-humanity-of-artemis...
1•LorenDB•8m ago•0 comments

Meta creating AI version of Mark Zuckerberg so staff can talk to the boss

https://www.theguardian.com/technology/2026/apr/13/meta-ai-mark-zuckerberg-staff-talk-to-the-boss
1•cpeterso•9m ago•0 comments

Show HN: Spectre: A systems design-by-contract language, self hosted compiler

https://spectrelang.org
1•death_eternal•10m ago•0 comments

NixOS example config using the dendritic pattern with flake-parts and hjem

https://github.com/eduardofuncao/nali
1•xGoivo•12m ago•1 comments

The Myopic Architects

https://twitter.com/AI_MickyJ/status/2043749839192649942
1•jger15•16m ago•0 comments

Sidecar: Mirror VS Code Copilot Chat to your phone over a WebSocket bridge

https://github.com/Davidobot/vscode-copilot-chat-sidecar
1•davidobot•17m ago•0 comments

Is the Strait of Hormuz Open?

https://isthestraitopen.io/
3•prngl•18m ago•0 comments

CadQuery is an open-source Python library for building 3D CAD models

https://cadquery.github.io/
1•gregsadetsky•19m ago•0 comments

Netgear Scores the First Exemption from the FCC's Foreign-Made Router Ban

https://www.pcmag.com/news/netgear-scores-the-first-exemption-from-the-fccs-foreign-made-router-ban
3•jnord•19m ago•0 comments

Suckless Screenshot Utility for Xorg

https://github.com/uint23/xnap
1•Jotalea•21m ago•0 comments

Show HN: I built a self-improving autonomous AI agent that runs 24/7

https://hergimuci.gumroad.com/l/ai-agent-blueprint
1•OpenClawAura•21m ago•0 comments

Italy Implements a New Labor Leave That Allows Workers to Care for Sick Pets

https://colombiaone.com/2026/04/11/italy-labor-leave-care-sick-pets/
1•doener•21m ago•0 comments

How Depression Physically Feels

https://passiveaggressionoftheworlds.substack.com/p/how-depression-feels
1•bunson_burner•23m ago•1 comments

Punjabi Kids YouTube – Rhymes and Learning

https://www.youtube.com/channel/UCuC2pezENaY3BTsDnACzY-w
1•fatbrother•25m ago•0 comments

I built an AI podcast that roasts a company with Lennys Newsletter as ammunition

https://www.lennyseviltwin.com/
1•Qlwentt•25m ago•1 comments

Measuring Human Performance on ARC-AGI-3

https://arcprize.org/blog/arc-agi-3-human-dataset
1•sanxiyn•27m ago•0 comments

PyCon needs 1,146 more hotel nights to meet "hotel minimum bookings."

https://twitter.com/LundukeJournal/status/2044107055049388115
3•fortran77•28m ago•0 comments

You can literally build a neural network w your hands. This CTO open-sourced how

https://twitter.com/lenadroid/status/2044185631396639195
1•lenadroid•29m ago•1 comments

The Most Boring Book in the World

https://ei3lh.eu/2026/04/14/the-most-boring-book-in-the-world/
1•austinallegro•30m ago•0 comments

A Terminal Spotify Client

https://github.com/dubeyKartikay/lazyspotify
1•Jotalea•32m ago•0 comments

Blowin' in the Wind: How Nordic Countries Made Electricity Free

https://atmos.earth/climate-solutions/blowin-in-the-wind-how-nordic-countries-made-electricity-free/
2•doener•34m ago•1 comments

Pushing Simulation to the Limit to Find Order in Chaos [video]

https://www.youtube.com/watch?v=8jVogdTJESw
1•kinderjaje•35m ago•1 comments

Scarcity and Fairness at Theme Parks

https://thelivingfossils.substack.com/p/scarcity-and-fairness-at-theme-parks
1•jger15•35m ago•0 comments

How a Ukraine Is Building a Cleaner, Stronger Power Future

https://happyeconews.com/ukraines-renewable-energy-rebuild/
1•doener•35m ago•0 comments

SpankMatch, Secrets, and (Everyone's) Orphaned Google Container Registry Layers

https://amenbreakpoint.com/posts/spankmatch-gcr-orphans/
1•ian_d•42m ago•0 comments

Show HN: OtaKit – push app updates without App Store reviews

https://www.otakit.app/
1•gregolo•42m ago•1 comments