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

Bitemporal CVE Receipts, Vex/KEV CI Gate, and MCP Server

https://vciy.com/scoreboard
1•voxell_code•8s ago•0 comments

Native Windows Dynamic Island, AppBar Taskbar, and Android Phone Deck in C#

https://github.com/JustNightt/OpenPixel
1•justnight•1m ago•1 comments

A curated selection of Arc-inspired browsers

https://arclikes.com
1•lnrd•4m ago•0 comments

Show HN: Flat fee inference limited by speed, not tokens

https://wideband.dev/app?promo=HACKERNEWS
1•valliveeti•4m ago•0 comments

Why I can't sell you a €1 email inbox

https://www.jannis.io/why-i-cant-sell-you-a-eur1-email-inbox/
1•amaccuish•4m ago•0 comments

Essential Ingredients in a Block Party Revolution (2017)

https://plazaperspective.com/block-party-revolution/
1•mslate•6m ago•0 comments

Show HN: Lilotab – a tab finder and switcher for Chrome

https://chromewebstore.google.com/detail/lilotab/jhdobndbhplpfcaaebplenpkdakdcamb
1•alphab_io•6m ago•0 comments

ELucid8 – A Practicall Dialect of Lucid

https://billwadge.com/2026/11/29/introducing-elucid8-a-practical-dialect-of-lucid/
1•bade•11m ago•0 comments

Four federal cases trace $974M in Nvidia chips and servers to China

https://ailately.com/articles/chip-smuggling-route-to-china
2•ryanedennis•11m ago•0 comments

Ask HN: What's Worth Your Click?

1•abitcynicalabou•12m ago•1 comments

A Subexponential Time Algorithm for Elliptic Curve Discrete Logarithm

https://github.com/bochum-crypto/subexponential-ecdl/tree/main
1•_tk_•13m ago•0 comments

Friday – an open-source alternative to Devin that runs on your laptop

https://github.com/splashxmoon/friday-code
2•teddyd1•13m ago•0 comments

Advertisement urging end of US Military aid to Israel dropped by NBC

https://www.aljazeera.com/news/2026/11/28/advertisement-urging-end-of-us-military-aid-to-israel-d...
4•unitedfirmware•14m ago•0 comments

After=network.target is a shutdown directive

https://savyasacheejha.com/posts/after-network-target/
1•genghizkhan•16m ago•0 comments

Show HN: AAMT v0.7 – Local WebGPU LLM and Diffusion CLI/SDK for Node.js

https://www.npmjs.com/package/@asamanthinks/aamt
1•YareAceNoK•16m ago•0 comments

XBOW vs. Zkao?

1•baby•18m ago•0 comments

How Effective Are Cold Reads for Agentic Review?

https://jonathannen.com/cold-cases/
1•jwilliams•21m ago•0 comments

Show HN: Building an ancient city builder game

https://tiberava.online/
4•arcadefirestorm•23m ago•0 comments

Brandeburg Concertos

https://en.wikipedia.org/wiki/Brandenburg_Concertos
2•gradus_ad•23m ago•0 comments

Farflung Geography Game – Play the Daily Map Quiz

https://farflung.game/
1•Tomte•24m ago•0 comments

Tokyo residents take governments to court as digitalization concerns mount

https://www.japantimes.co.jp/news/2026/11/29/japan/crime-legal/tokyo-app-digital-divide/
1•geox•24m ago•0 comments

Long-Term Memory for a 32K Local Agent: Testing Mnemonic Proxy

https://sotaaz.com/post/mnemonic-proxy-en
2•lastreload•29m ago•0 comments

"Did you know I helped develop recurrent transformers? It's the thing that "

https://www.reddit.com/r/coaxedintoasnafu/comments/1y8l712/coaxed_into_silicon_valleys_awesome_fu...
1•AmbroseBierce•29m ago•1 comments

I made the most beautiful interactive 3D fluid simulation in unreal [video]

https://www.youtube.com/shorts/7WZ8d2GNzEU
1•shroom1•30m ago•0 comments

Show HN: Directory of Markdown Websites

https://buttertart.net
1•amordecosmos•31m ago•0 comments

Show HN: Axum-like Discord bots library in Rust

https://github.com/Nekidev/dyncord
1•nyeki•32m ago•0 comments

Cumulative Measurement Error

https://aphyr.com/posts/431-cumulative-measurement-error
2•lucamark•33m ago•0 comments

How to Cool Down Computers Inside of An Airbus A320 [video]

https://www.youtube.com/watch?v=L7Qwj4Hm1EE
1•karakoram•34m ago•0 comments

Have You Tried Using Your Agent?

https://blog.jim-nielsen.com/2026/have-you-tried-your-agent/
2•Curiositry•35m ago•1 comments

Wine-Staging 11.23 Released with Fix for Steam

https://www.phoronix.com/news/Wine-Staging-11.23
1•Bender•35m ago•0 comments