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

USD by the Numbers

https://taylor.town/money-supply
1•tosh•1m ago•0 comments

Programming the ZX Spectrum's Bitmap Display

https://bumbershootsoft.wordpress.com/2026/06/13/programming-the-zx-spectrums-bitmap-display/
2•ibobev•3m ago•0 comments

How can I schedule work on a thread pool with low latency?

https://devblogs.microsoft.com/oldnewthing/20260612-00/?p=112417
1•ibobev•4m ago•0 comments

Upgrading my Apple II serial setup

https://www.colino.net/wordpress/archives/2026/06/14/upgrading-my-apple-ii-serial-setup/
2•ibobev•4m ago•0 comments

Are we asking the right questions?

1•redipascov•4m ago•0 comments

IISU Frontend final alpha (v0.0.7) released

https://github.com/iisu-network/iiSU/releases/tag/0.0.7.2
1•chromehearts•6m ago•0 comments

When the Event Is the Prompt

https://go-micro.dev/blog/21
1•asim•7m ago•1 comments

Why Mechanical Sympathy? (2011)

https://mechanical-sympathy.blogspot.com/2011/07/why-mechanical-sympathy.html
2•tosh•9m ago•0 comments

Zhynx on X: "Your AI could die tomorrow." / X

https://twitter.com/onlyzhynx/status/2066178507449721277
2•bilsbie•10m ago•0 comments

New SDK Available for AmigaOS 4.1 Final Edition

https://amiga-news.de/en/news/AN-2026-06-00067-EN.html
1•codewiz•10m ago•0 comments

Surpassing Frontier Performance with a Fusion of multiple models

https://openrouter.ai/blog/announcements/fusion-beats-frontier/
3•chr15m•10m ago•0 comments

Data-Parallel Thinking (2024) [pdf]

https://gfxcourses.stanford.edu/cs149/fall24content/media/dataparallel/08_dataparallel_uvO76Qr.pdf
1•tosh•12m ago•0 comments

Prime Minister Sir Keir Starmer has announced a social media ban for under-16s

https://twitter.com/SkyNews/status/2066420074265661746
1•bbayer•13m ago•0 comments

Hetzner Cloud prices are up 120%

https://www.hetzner.com/de/pressroom/standardization-and-price-adjustment-of-our-server-products/
1•mitjam•18m ago•2 comments

Chrome had the highest idle CPU and RAM usage in a 5-browser benchmark

https://gopeek-lovat.vercel.app/blog-chrome-best-browser-2026.html
2•GeorgeWoff25•19m ago•2 comments

"They screwed us": Personality clashes sent Anthropic's models offline

https://www.axios.com/2026/06/15/anthropic-white-house-fable-mythos
1•The_Gray•19m ago•0 comments

New solid-state ACs promise a cool future. Scientists aren't so sure

https://www.technologyreview.com/2026/06/15/1138552/solid-state-acs-promise-cool-future/
2•joozio•23m ago•0 comments

Coding Agent Sandboxes Don't Solve Credential Authorization

https://www.permit.io/blog/coding-agent-sandboxes-credentials
1•gemanor•24m ago•0 comments

Frontier teams are reinventing AI-native development

https://aws.amazon.com/blogs/machine-learning/how-frontier-teams-are-reinventing-ai-native-develo...
1•kator•25m ago•0 comments

Manufacturer bloatware is finally becoming optional – and this app is proof

https://www.makeuseof.com/manufacturer-bloatware-optional-app-proof-never-needed/
1•ripe•26m ago•0 comments

Show HN: 1000 C++ problems, every solution compiled and tested on g++

https://hatemwave.gumroad.com/l/ffenif
1•HatemDabet•26m ago•0 comments

The Web We Know Is Going to Disappear

https://www.minid.net/2026/6/15/the-web-is-going-to-dissapear
3•meerita•27m ago•1 comments

Show HN: Unique Gemstones for Your Strings

https://seedstone.xyz/
2•mdrfi•28m ago•0 comments

Triple Shockwave from Sun Crossing Rocket

https://apod.nasa.gov/apod/ap260615.html
3•xnx•30m ago•1 comments

Show HN: Sweepr – Daily Minesweeper with a guess-free board generator

https://sweepr.online/
2•youreawizerdhar•31m ago•1 comments

Metaspec: The dpANS3 Common Lisp Specification in s-expr format

https://metaspec.dev/
1•dlowe-net•32m ago•1 comments

Dependent Haskell – Vladislav Zavialov

https://www.typetheoryforall.com/episodes/dependent-haskell
2•alexandersechin•33m ago•1 comments

The Mote in AI's Eye: software engineering with agents

https://musicallyut.xyz/
1•musically_ut•34m ago•0 comments

It doesn't matter if it works

https://henry.codes/writing/it-doesnt-matter-if-it-works/
1•tobr•36m ago•0 comments

Fallow – Deterministic codebase intelligence for TypeScript and JavaScript

https://github.com/fallow-rs/fallow
1•modinfo•38m ago•0 comments