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•11mo 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

What would make an academic AI assistant trustworthy for students?

https://github.com/DavidHavoc/openworkers
1•dvdhvc•28s ago•1 comments

Two Maps, One Domain

https://docs.eventsourcingdb.io/blog/2026/05/07/two-maps-one-domain/
1•goloroden•56s ago•0 comments

The Chinese Realtime Deepfake Software Powering Scams Around the World

https://www.404media.co/hello-boss-inside-the-chinese-realtime-deepfake-software-powering-scams-a...
1•tysone•1m ago•0 comments

Tests confirm tilapia in mackerel cans

https://www.bangkokpost.com/thailand/general/3250868/tests-confirm-tilapia-in-mackerel-cans
1•teleforce•2m ago•0 comments

What Causes Lightning? The Answer Keeps Getting More Interesting

https://www.quantamagazine.org/what-causes-lightning-the-answer-keeps-getting-more-interesting-20...
2•Brajeshwar•3m ago•1 comments

Cloudflare responded to the "Copy Fail" Linux vulnerability

https://blog.cloudflare.com/copy-fail-linux-vulnerability-mitigation/
1•mobeigi•3m ago•0 comments

In OpenAI trial, former CTO: Altman sowed 'chaos,' distrust among top executives

https://www.reuters.com/legal/litigation/openai-trial-former-technology-chief-says-altman-sowed-c...
1•1vuio0pswjnm7•3m ago•0 comments

Ars Asks: Share your shell and show us your tricked-out terminals

https://arstechnica.com/information-technology/2026/05/ars-asks-share-your-shell-and-show-us-your...
1•duxup•4m ago•0 comments

How did 'large' language models get that way?

https://www.greaterwrong.com/posts/gcKhnqysxj9bBvbWD/how-did-large-language-models-get-that-way-t...
1•gmays•4m ago•0 comments

AgentWrit, a Go broker for task-scoped AI agent credentials

https://github.com/devonartis/agentwrit
1•tdevonartis•4m ago•0 comments

Consuming too much AI can be bad. Data on 'tokenmaxxing' reveals a better way

https://www.businessinsider.com/ai-tokenmaxxing-fails-as-productivity-strategy-jellyfish-2026-5
1•gailaxelrod•5m ago•0 comments

Go's regular expressions are either slow or even slower than expected

https://ceving.gitlab.io/goregexpbench/
1•ceving•7m ago•0 comments

Number. Everyone gets one. (App)

https://yournumber.app/
1•philippta•8m ago•1 comments

Scripty

https://kristoff.it/blog/scripty/
1•ibobev•10m ago•0 comments

Fizz Buzz Through Monoids

https://entropicthoughts.com/fizzbuzz-through-monoids
3•ibobev•11m ago•0 comments

Midday Is Joining Ramp

https://midday.ai/updates/joining-ramp/
3•hisamafahri•11m ago•0 comments

The Mirror Is Part of the Machine

https://yusufaytas.com/the-mirror-is-part-of-the-machine
5•yusufaytas•11m ago•0 comments

Why So Few Babies? We Might Have Overlooked the Biggest Reason of All

https://www.nytimes.com/2026/05/07/opinion/birthrate-kids-parents-demographics-future.html
3•mooreds•11m ago•0 comments

Jobs at mom-and-pop shops are disappearing

https://www.cnn.com/2026/05/07/business/jobs-small-business-trump-economy
1•mooreds•12m ago•0 comments

Who owns the Wizardry RPGs? We do, say both Drecom and Atari

https://www.rockpapershotgun.com/who-owns-the-wizardry-rpgs-we-do-say-both-drecom-and-atari-as-an...
2•Tomte•12m ago•0 comments

Scroll-Driven Animations

https://www.joshwcomeau.com/animation/scroll-driven-animations/
1•birdculture•12m ago•0 comments

Φ³−φ⁻³=4 (exact): The transformer's ff/d ratio is algebraic, not empirical

https://zenodo.org/records/20020443
1•angusdewer•12m ago•1 comments

AI in B2B Sales: How Managed Loops Are Replacing CRM Services

https://www.promptmetrics.dev/blog/services-as-software-is-coming-for-your-crm-heres-how-to-win
1•promptmetrics•13m ago•0 comments

Show HN: CacheCore – semantic agent caching with dependency invalidation

https://cachecore.it/
1•fabriziorocco•13m ago•1 comments

A Snapshot of the Performance of WASM Back Ends for Managed Languages [video]

https://www.youtube.com/watch?v=Lm53oPq7R6Q
1•surprisetalk•13m ago•0 comments

The Great Flattening

https://www.warman.life/blog/2026-05-05-the-great-flattening/
1•RickJWagner•14m ago•0 comments

Ask HN: I was tired of sharing personal phone number just to get a printout

1•gray_wolf_99•14m ago•0 comments

Show HN: Learn a Language Through Trivia

https://trivia.lmny.dev/
1•danielrmay•15m ago•0 comments

LLM-driven security reports disrupt coordinated disclosure

https://lwn.net/SubscriberLink/1070698/708a56108d2a9e2e/
1•jwilk•15m ago•0 comments

Show HN: XLog Static site generator for knowledge bases with automatic backlinks

https://github.com/emad-elsaid/xlog
1•blazeeboy•15m ago•0 comments