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

Your problem with Vim is that you don't grok vi.

https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim
1•chanana•1m ago•0 comments

The Map Is Not the Territory: The Agent-Tool Trust Boundary

https://niyikiza.com/posts/map-territory/
2•niyikiza•14m ago•0 comments

If you want to plan your dev projects faster, use this tool

https://getfrostbyte.dev/
3•Skyfall106•21m ago•0 comments

Are the YouTube channel Courts and Crimes's shorts AI-generated deep fakes?

https://skeptics.stackexchange.com/questions/60423/are-the-youtube-channel-courts-crimess-shorts-...
2•razor-thin•26m ago•0 comments

Show HN: OpenAI FM – Zero-setup AI voice tool(Inspired by repo)

https://openai-fm.org/
2•thenextechtrade•30m ago•0 comments

Altaid 8800

https://sunrise-ev.com/8080.htm
2•exvi•30m ago•0 comments

Z80 Mem­ber­ship Card

https://sunrise-ev.com/z80.htm
3•exvi•30m ago•0 comments

Reverse Shell as a Service

https://github.com/lukechilds/reverse-shell
2•jayhoon•34m ago•0 comments

Bill Pearson's (Alien Supervising Model Maker) Portfolio, Projects and Showreel

https://www.bookofthedead.ws/bill_pearson/
2•exvi•35m ago•0 comments

BreachForums hacking forum database leaked, exposing 324,000 accounts

https://www.bleepingcomputer.com/news/security/breachforums-hacking-forum-database-leaked-exposin...
3•hentrep•37m ago•0 comments

Time without end: Physics and biology in an open universe-Freeman J. Dyson [pdf]

https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.51.447
2•thunderbong•38m ago•0 comments

China-Australia relationship in 2026? This is how experts in China see it

https://theconversation.com/can-the-china-australia-relationship-stay-on-track-in-2026-this-is-ho...
3•defrost•42m ago•1 comments

Software Engineer Pay at McDonalds

https://www.levels.fyi/companies/mcdonalds/salaries/software-engineer
2•filetmignon•44m ago•0 comments

Pineapple Desktop (FreeDOS)

https://doscore.net/pineapple.html
3•kristopolous•45m ago•2 comments

Show HN: AgentWatch – A terminal dashboard for monitoring AI Agent costs

https://github.com/Tarunjit45/agentwatch
2•DarkX45•46m ago•0 comments

Harmonia – Hash function using Golden Ratio and Quasicrystal mathematics

https://github.com/faustodas-afk/harmonia-crypto
2•fadase•47m ago•1 comments

Found a rare moment when HN is restarting server

https://freeimage.host/i/screenshot-2026-01-12-112131.fvEKgee
2•celurian92•48m ago•0 comments

Show HN: Moving files without install on the host

https://uldl.sh
1•thedanielforum•48m ago•0 comments

Gh-Dash – GitHub PR Dashboard for Claude Code

https://github.com/jakozloski/claude-code-gh-dash
1•handfuloflight•1h ago•0 comments

Show HN: I kept forgetting Git worktree syntax, so I wrapped it

https://github.com/binbandit/workty
2•binbandit•1h ago•1 comments

Malaysia and Indonesia Block Elon Musk's Grok

https://www.cnbc.com/2026/01/12/malaysia-indonesia-block-elon-musks-grok-obscene-non-consensual-c...
3•rfarley04•1h ago•0 comments

The Workings of the Pentagon's UFO Reverse Engineering Program [video]

https://www.youtube.com/watch?v=u7g5Sn1DJF4
4•keepamovin•1h ago•0 comments

Semantic Rebase

https://www.peterjthomson.com/2026/01/semantic-rebase/
1•handfuloflight•1h ago•0 comments

XFCE Is Great

https://rubenerd.com/xfce-is-great/
64•mikece•1h ago•33 comments

Xibo open-source digital signage solution now works with Raspberry Pi 5

https://www.cnx-software.com/2026/01/12/xibo-open-source-digital-signage-solution-now-works-with-...
1•mikece•1h ago•0 comments

Everything you should know about PostgreSQL constraints

https://xata.io/blog/constraints-in-postgres
2•tudorg•1h ago•0 comments

The Definitive Guide to Claude Code

https://jpcaparas.medium.com/the-definitive-guide-to-claude-code-from-first-install-to-production...
3•handfuloflight•1h ago•0 comments

The beauty queen who caught Scotland's most prolific catfish

https://www.bbc.com/news/articles/ckgkr15el67o
1•ryan_j_naughton•1h ago•1 comments

Show HN: Remember Me AI (FULL RELEASE) – 40x cost reduction in AI memory systems

https://github.com/merchantmoh-debug/Remember-Me-AI
2•MohskiBroskiAI•1h ago•0 comments

Shopify and Google Announce Universal Commerce Protocol

https://www.shopify.com/ca/ucp
2•ianschmitz•1h ago•0 comments