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

Can Animals Be Right- or Left-Pawed?

https://www.discovermagazine.com/the-animal-kingdom-is-full-of-righties-and-lefties-42164
1•thunderbong•48s ago•0 comments

Travel

https://www.google.com/
1•BrentLakin•1m ago•0 comments

How to Switch from Windows to Linux

https://sprune.com/blog/how-to-switch-from-windows-to-linux/
1•nreece•3m ago•0 comments

Show HN: Daily Math Puzzle

https://dozenal.game
1•sarreph•6m ago•0 comments

Police Surveillance Technology: Last Week Tonight with John Oliver (HBO) [video]

https://www.youtube.com/watch?v=lnBPhelCdWE
1•jhonovich•12m ago•0 comments

Pipe – A runtime where AI operations are language primitives

https://pipe-lang.com
1•harrymachura•12m ago•0 comments

A C++ toolchain from 357 bytes, in Bazel

https://fzakaria.com/2026/08/01/a-c++-toolchain-from-357-bytes-in-bazel
1•ingve•15m ago•0 comments

Napoleon (1926)

https://gutenberg.org/cache/epub/79253/pg79253-images.html
1•petethomas•17m ago•0 comments

Show HN: Eight: a symbolic, indentation-based programming language

https://git.disroot.org/EightLang/Eight/src/branch/alpha
1•Vextoly•19m ago•1 comments

How rogue officers turned a nationwide camera network into a tool for stalking

https://www.washingtonpost.com/technology/2026/08/02/how-police-officers-used-vast-network-camera...
1•baranul•23m ago•0 comments

Sony BMG copy protection rootkit scandal from 2005

https://en.wikipedia.org/wiki/Sony_BMG_copy_protection_rootkit_scandal
2•thinkingemote•27m ago•0 comments

Fastmail offers EU data region

https://www.fastmail.com/blog/fastmail-offers-eu-data-region/
2•jamesog•31m ago•1 comments

Show HN: ssh paint.dn.ht

1•dhotson•40m ago•0 comments

The Shape of Things to Come

https://yegge.ai/essays/the-shape-of-things-to-come/
3•tosh•41m ago•0 comments

What the Bliss Taught Us

https://daniel.haxx.se/blog/2026/08/03/what-the-bliss-taught-us/
2•robin_reala•45m ago•0 comments

I stopped trusting USB-C cable labels and started testing them

https://www.makeuseof.com/i-stopped-trusting-usb-c-cable-labels-started-testing-with-meter-instead/
2•baranul•50m ago•0 comments

Giggity – Conference Schedule Viewer

https://wilmer.gaa.st/main.php/giggity.html
1•n_plus_1_acc•50m ago•0 comments

The AI Productivity Gap

https://bjorg.bjornroche.com/management/ai-productivity-gap/
2•kiyanwang•56m ago•0 comments

Language Models Agree with Each Other, Not with Readers

https://arxiv.org/abs/2607.29274
1•sbulaev•56m ago•0 comments

Practical Memory Safety

https://ohadravid.github.io/posts/2026-08-unsafe-water/
1•jandeboevrie•1h ago•0 comments

Trust Is Gone: AI Safety Needs Individuals

https://www.lesswrong.com/posts/cm3Ea9tBHpjj9zjji/trust-is-gone-ai-safety-needs-individuals
2•joozio•1h ago•0 comments

The silent handoff of the new MCP release [video]

https://www.youtube.com/watch?v=3uOoG6rholU
3•sam_3•1h ago•0 comments

Ask HN: Do you ever think about the environmental impacts of the AI datacenters?

1•roschdal•1h ago•1 comments

Adding Go's Defer to the TypeScript Compiler

https://healeycodes.com/adding-defer-to-the-typescript-compiler
1•ingve•1h ago•0 comments

Spain's plan for the first octopus farm has been abandoned

https://www.bbc.com/future/article/20260731-spains-attempt-to-farm-octopuses-has-failed
2•geox•1h ago•0 comments

A 3-line HTML drop-in that replaces passwords with FaceID

https://nxspulse.com
1•paulnexus•1h ago•0 comments

The Framebuffer People: I Cloned Every OS on r/osdev and Found Five Real Ones

https://www.seuros.com/blog/the-framebuffer-people/
3•st_goliath•1h ago•2 comments

What Makes an Intelligence Product?

https://luntta.fi/notes/what-makes-an-intelligence-product/
1•hungryhungryhip•1h ago•0 comments

A Black woman enhanced the audio in Nolan Wells' case. People listening closely

https://thegrio.com/2026/07/28/a-black-woman-enhanced-the-audio-in-a-call-related-to-nolan-wells-...
1•baranul•1h ago•0 comments

New open sourced eval tool for building agents

1•Thomeras•1h ago•0 comments