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

Beyond adoption: How to measure AI's real business impact

https://www.augmentcode.com/blog/beyond-adoption-how-to-measure-ai
1•mooreds•3m ago•0 comments

Why job boards are very important

https://taylordesseyn.substack.com/p/why-job-boards-are-v-important
1•mooreds•4m ago•0 comments

Tommy Flowers

https://en.wikipedia.org/wiki/Tommy_Flowers
1•tonyedgecombe•6m ago•0 comments

Ask HN: My mother was scammed out of all her savings. What should I do?

1•scapbi•8m ago•0 comments

What Is Good Product Management?

https://www.techfounderstack.com/p/what-is-good-product-management
1•makle•10m ago•0 comments

The State of Legal AI in 2025

https://theredline.versionstory.com/p/why-cant-43b-in-legal-ai-investment
1•jpbryan•11m ago•0 comments

Unofficial 37signals Coding Style Guide

https://github.com/marckohlbrugge/unofficial-37signals-coding-style-guide
1•mooreds•11m ago•0 comments

Is it overkill to build RPMs for yourself if there is no intention to distribute

https://old.reddit.com/r/Fedora/comments/1psm48n/is_it_overkill_to_build_rpms_for_yourself_if/
1•sipofwater•12m ago•0 comments

Laid Off After 25 Years in Tech: The Anxiety, Sacrifice, and Reality No One Talk

https://www.youtube.com/watch?v=VeMA9WGKxOg
1•aupra•14m ago•0 comments

The science of green hair care

https://knowablemagazine.org/content/article/food-environment/2025/science-of-green-hair-care
1•sohkamyung•15m ago•0 comments

Cool FOSS projects I've found since switching to Fedora

https://old.reddit.com/r/Fedora/comments/1ps38w3/cool_foss_projects_ive_found_since_switching_to/
1•sipofwater•18m ago•0 comments

City's Best Winter Show Is in Its Pitch-Dark Skies

https://www.nytimes.com/card/2025/12/21/science/space/arizona-dark-sky-astronomy
1•quapster•19m ago•0 comments

How America Gave China an Edge in Nuclear Power

https://www.newyorker.com/news/the-lede/how-america-gave-china-an-edge-in-nuclear-power
2•pseudolus•21m ago•1 comments

Dog Spinner

https://www.pigenpalace.com/dogspinner/
2•dhotson•23m ago•0 comments

Water Cremation

https://en.wikipedia.org/wiki/Water_cremation
1•thunderbong•25m ago•0 comments

Show HN: ClearNoteLab – Turn meeting notes into client-ready PDFs in 30 seconds

https://clearnotelab.com
1•jackbrauner•26m ago•0 comments

He made beer that's also a vaccine. Now controversy is brewing

https://www.sciencenews.org/article/vaccine-beer-polyomavirus-chris-buck
1•sohkamyung•28m ago•0 comments

Minecraft, but It's a Wayland Compositor

https://www.youtube.com/watch?v=lsBxWYDspV8
1•willis936•31m ago•0 comments

Show HN: VS Lounge – A SNS for hackers, but only available as a VSCode extension

https://vs-lounge.com/
1•_ysknsn•34m ago•0 comments

Making Documentation Executable – No More Outdated Docs [video]

https://www.youtube.com/watch?v=hO6QUhVY6U4
1•markkuhaukka•37m ago•0 comments

Japan prepares to restart biggest nuclear plant, 15 years after Fukushima

https://www.reuters.com/sustainability/boards-policy-regulation/japan-prepares-restart-worlds-big...
2•thm•39m ago•0 comments

Thirteen years of Rust and the birth of Rue

https://steveklabnik.com/writing/thirteen-years-of-rust-and-the-birth-of-rue/
1•rpgbr•40m ago•0 comments

Show HN: RustX – Python Ease, Rust Speed

https://github.com/GrandpaEJx/RustX
1•ZOROX•43m ago•0 comments

That's Not a Blobfish: Deep Sea Social Media Is Flooded by AI Slop

https://www.southernfriedscience.com/thats-not-a-blobfish-deep-sea-social-media-is-flooded-by-ai-...
3•sohkamyung•47m ago•0 comments

Show HN: Wifui – A Rust TUI for Wi-Fi on Windows

https://github.com/sohamw03/wifui
1•sohamw03•47m ago•0 comments

Chinese open-source AIs are winning over a growing number of companies in the US

https://www.france24.com/en/live-news/20251222-as-us-battles-china-on-ai-some-companies-choose-ch...
3•giuliomagnifico•47m ago•1 comments

James Webb Space Telescope confirms first 'runaway' supermassive black hole

https://www.space.com/astronomy/black-holes/james-webb-space-telescope-confirms-1st-runaway-super...
3•benkan•48m ago•0 comments

Why US and Chinese satellites are 'dogfighting' in orbit

https://www.msn.com/en-us/news/world/why-us-and-chinese-satellites-are-dogfighting-in-orbit/ar-AA...
3•benkan•49m ago•0 comments

Media over QUIC: You Don't Need It

https://moq.dev/blog/you-dont-need-it/
2•kixelated•50m ago•0 comments

A Carbon-Rich Atmosphere on a Windy Pulsar Planet

https://iopscience.iop.org/article/10.3847/2041-8213/ae157c
1•defrost•52m ago•0 comments