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

If [static analysis] could have, why didn't it?

https://alexgaynor.net/2026/apr/13/why-didnt-it/
1•ramimac•4m ago•0 comments

Global imbalances are back with no clear path to resolution

https://www.reuters.com/markets/global-imbalances-are-back-theres-no-fix-sight-2026-04-08/
1•latentframe•7m ago•1 comments

OpenAI snub shows UK's energy costs are killing industry

https://www.thetimes.com/business/economics/article/open-ai-uk-energy-costs-nuclear-wind-wvs36bwdw
1•petethomas•8m ago•0 comments

Shock from Iran war has Trump's vision for US energy dominance flailing

https://insideclimatenews.org/news/09042026/iran-energy-shock-tests-us-dominance/
1•rbanffy•8m ago•0 comments

Technical SEO vs. content optimization: which one moves rankings?

1•zensorsolutions•13m ago•1 comments

The disappearing and unappreciated art of audible alerts [video]

https://www.youtube.com/watch?v=nXdVG45wveo
1•neehao•15m ago•1 comments

Inland Customs Line

https://en.wikipedia.org/wiki/Inland_Customs_Line
1•thunderbong•17m ago•0 comments

Show HN: Connections Hint Today – spoiler-safe hints for NYT Connections

https://connections-hint.today/
1•visiohex•18m ago•0 comments

Linux 7.0 Released with New Hardware Support, Optimizations and Self-Healing XFS

https://www.phoronix.com/news/Linux-7.0-Released
2•isaacfrond•21m ago•0 comments

Show HN: Nous – A compiled language for self-healing AI agents

https://nous-lang.org
1•contrario•24m ago•0 comments

More than 100 reverse engineered hidden Shortcuts actions for iOS and macOS

https://github.com/paralevel/secret-actions-for-shortcuts
2•trapf•27m ago•0 comments

Nvidia AIStore – scalable storage for AI applications

https://aistore.nvidia.com/
1•DaGardner•27m ago•0 comments

Stonks-CLI – track your investment portfolios from the terminal

https://github.com/igoropaniuk/stonks-cli
1•friedchocolate•28m ago•0 comments

Aljhon Victoria

1•ashleyshaine•29m ago•0 comments

DPRK IT Worker Captcha

https://nkcaptcha.com/
1•swijck•31m ago•0 comments

Who needs VCs when you have friends like these? – Stack Overflow

https://stackoverflow.blog/2026/04/14/who-needs-vcs-when-you-have-friends-like-these/
1•salkahfi•33m ago•0 comments

Now you can play retro Windows games too along with DOS on NostalgiaApp on a Mac

https://www.nostalgi.app/
2•jupe69•38m ago•0 comments

Unmasking the Creator of Bitcoin [audio]

https://www.nytimes.com/2026/04/09/podcasts/the-daily/satoshi-nakamoto-bitcoin-creator.html
1•doener•43m ago•0 comments

Huion Devices in the Desktop Stack

http://who-t.blogspot.com/2026/04/huion-devices-in-desktop-stack.html
2•JNRowe•44m ago•1 comments

"Wretches, Speak Evil of Me": Goethe and Schiller's Xenions (1896 Edition)

https://publicdomainreview.org/collection/xenions/
1•benbreen•47m ago•0 comments

The Shinkansen

https://www.worksinprogress.news/p/the-secret-behind-japans-railways
11•WillDaSilva•52m ago•0 comments

I built a product that allows you to generate a ad off of just a product url

https://cutagent.vercel.app/
1•rishidandu•54m ago•0 comments

Show HN: Tsplat – Render Gaussian Splats directly in your terminal

https://github.com/darshanmakwana412/tsplat
5•darshanmakwana•57m ago•1 comments

Why don't lighthouses look like this anymore? [video]

https://www.youtube.com/watch?v=WA0L5xznsKE
1•llimos•57m ago•1 comments

Can Claude Fly a Plane?

https://so.long.thanks.fish/can-claude-fly-a-plane/
43•casi•1h ago•30 comments

Australia closed all of its refineries

https://www.youtube.com/watch?v=Fu6xnDSZyHM
2•curio_Pol_curio•1h ago•1 comments

Distributed DuckDB Instance

https://github.com/citguru/openduck
24•citguru•1h ago•5 comments

Paul Craig Roberts: 3 ways greater Israel wrecked the peace talks

8•__patchbit__•1h ago•1 comments

Who Gets Guggenheims?

https://www.publicbooks.org/who-gets-guggenheims/
2•apollinaire•1h ago•0 comments

Paul Craig Roberts: 3 ways greater Israel wrecked the peace talks

https://www.youtube.com/watch?v=BW-OrMPa-5c
2•__patchbit__•1h ago•0 comments