frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

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

The early days of Unix in the UK

https://www.coulouris.net/cs_history/em_story/
1•fanf2•4m ago•0 comments

World Money: A Financial Super App for Humans

https://world.org/blog/announcements/world-money
1•thm•5m ago•0 comments

War may be coming. Are we psychologically ready?

https://www.bbc.com/news/articles/cmn0jke547r5o
2•vinni2•7m ago•0 comments

The LLM Comments Are Not for You

https://danilafe.com/blog/comments_not_for_you/
1•kqr•8m ago•0 comments

iCloud+ Now Includes Apple TV and Apple Arcade

https://www.icloud.com/en-sg/info/icloud-plus-tv-arcade
1•JustSkyfall•8m ago•0 comments

Relax for the Same Result

https://sive.rs/relax
1•piqufoh•9m ago•0 comments

Phone coverage across the London tube sent me hurtling down a tunnel of despair

https://www.theguardian.com/commentisfree/2026/sep/14/phone-coverage-tube-london-underground-tube
3•edward•11m ago•0 comments

Using steal time to moderate CPU demands

https://lwn.net/Articles/1090381/
1•signa11•16m ago•0 comments

A Pause for the Python JIT

https://lwn.net/Articles/1090385/
3•signa11•16m ago•0 comments

Show HN: A web page that counts its own visitors and cannot lie

https://ava-wall.surge.sh
1•ava-14•25m ago•0 comments

Jev is trained on 100% synthetic data

https://twitter.com/CompleteSkeptic/status/2100617775823966680
1•rinesh•28m ago•0 comments

Show HN: Fouine – local full-text and semantic search for scanned PDFs on macOS

https://github.com/basedpolymer/fouine
1•basedpolymer•31m ago•0 comments

What to Expect When You're Expecting (A World of Multi-Agent Systems)

https://asteriskmag.com/issues/15/what-to-expect-when-you-re-expecting-a-world-of-multi-agent-sys...
1•ronfriedhaber•31m ago•0 comments

Dxui – A declarative desktop GUI framework for Go, without cgo

https://github.com/dxui-org/dxui
1•truda•34m ago•0 comments

Hugging Face attack: "This might be the clearest warning shot we ever get" [video]

https://www.youtube.com/watch?v=X50zezLFWWI
1•looofooo0•35m ago•0 comments

Eight language models and the 2026 Berlin state election

https://wahl.ksmn.dev/en/
2•hemartin•36m ago•0 comments

Cassette-shaped MP3 player meant to be played on tape decks [video]

https://www.youtube.com/watch?v=otXrFBq0HWQ
1•eps•36m ago•0 comments

FeatureMap – map your product's features

https://github.com/yonathan06/featuremap
1•yonatan06•36m ago•0 comments

Why dynamic balance matters at 1200M/min

1•AmyraZhao•37m ago•0 comments

Gyazo screen capture tool confirms data breach

https://updates.gyazo.com/notice-and-apology-regarding-a-data-breach-resulting-from-unauthorized-...
1•2sf5•39m ago•0 comments

What to Read to Stay Grounded Amidst AI Doomerism

https://buttondown.com/maiht3k/archive/what-to-read-to-stay-grounded-amidst-ai-doomerism/
1•james_mir•43m ago•0 comments

The Entity Service Antipattern

https://www.michaelnygard.com/blog/2017/12/the-entity-service-antipattern/
1•simianwords•47m ago•0 comments

One AWS Bill Went from Almost $8k a Month Toward $6k

https://greenops.cloud/blog/blog-cost-drop-8k-to-6k
1•depidsvy•49m ago•0 comments

Has World War III Already Started?

https://www.nytimes.com/2026/08/25/opinion/has-world-war-iii-already-started.html
2•Alien1Being•49m ago•0 comments

Targeting 25 years of Windows with Visual Studio 2019

https://building.enlyze.com/posts/targeting-25-years-of-windows-with-visual-studio-2019/
2•birdculture•50m ago•0 comments

The Cost of AI Is Now My Main Blocker

https://www.vincentschmalbach.com/cost-of-ai-is-now-my-main-blocker/
2•vincent_s•52m ago•0 comments

BuiltByVibe – Directory of vibe-coded apps with a free MCP server

https://builtbyvibe.dev/
1•notevenbuttery•56m ago•0 comments

Altman, Huang: "trust me; gonna b fine"; Sanders: "AI more dangerous than nukes"

https://garymarcus.substack.com/p/sam-altman-says-trust-me-jensen-huang
3•mdp2021•57m ago•2 comments

Fermi.gg – Daily game based on the "Fermi estimation" technique

https://fermi.gg
1•epaga•1h ago•0 comments

Everything Feels Fake – Here's Why: The Power Elite Playbook [video]

https://www.youtube.com/watch?v=P33-rjgOXzg
1•enemyz0r•1h ago•0 comments