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

Attack of the Vibe Coded Photoshop Clones

https://www.shokunin.studio/blog/2026/10/9/attack-of-the-vibe-coded-photoshop-clones
1•riffraff•1m ago•0 comments

My favorite sci-fi books with character journeys you'll (probably) never forget

https://bookdna.com/best-books/sci-fi-character-journeys-youll-probably-never-for
1•bwb•5m ago•0 comments

Parsing in .woff2

https://rohanadwankar.github.io/posts/woff2.html
1•RohanAdwankar•10m ago•1 comments

A Critical Look at Lean4

https://www.lesswrong.com/posts/zHhGa3iQBQcdSifFL/a-critical-look-at-lean4-1
2•amanverasia•12m ago•0 comments

How to back up your Google data

https://ashishb.net/programming/google-backup/
1•ashishb•14m ago•0 comments

Why is a crop that could feed millions only cultivated in one place?

https://www.cnn.com/science/enset-ethiopia-climate-change-crop-banana-spc-intl
1•asplake•21m ago•2 comments

Scalability but at What Cost? [video]

https://www.youtube.com/watch?v=gicykX-RxzU
1•david_sluijs•21m ago•0 comments

RobynNews – an AI news show by AI learning from its YouTube comments

https://robynnews.com/
1•sebbrieger•23m ago•0 comments

Dexter U.S. Glicol VST

https://www.patreon.com/Dexerus/posts/dexter-u-s-vst-0-172109525
1•Dexter_US•26m ago•1 comments

US lobbies allies to cut ties to anti-disinfo conf over panel critical of it

https://www.reuters.com/world/americas/us-lobbies-allies-cut-ties-anti-disinformation-conference-...
1•Risse•26m ago•0 comments

Show HN: Privacy-First JSON Formatter which works on the browser

https://instantjsonformatter.com
1•UmangPawar•26m ago•0 comments

Cryptomining malware used poetry to infect more than 3,400 servers

https://www.tomshardware.com/tech-industry/cyber-security/cryptomining-malware-used-poetry-to-inf...
1•sbulaev•29m ago•0 comments

'Human-authored' book labels gain ground amid AI scandals

https://techxplore.com/news/2026-10-human-authored-gain-ground-ai.html
1•geox•31m ago•0 comments

Ask HN: As a Democrat in USA, how can you support AI datacenters?

4•roschdal•36m ago•1 comments

Build with eve and TanStack Start to make a web chat

https://github.com/vercel-labs/eve-tanstack-start-template
2•flashbrew•36m ago•0 comments

Unity Engine adds 'Make Game' button (2012)

https://web.archive.org/web/20120501131830/http://blogs.unity3d.com/2012/04/01/semantic-game-buil...
1•coinfused•44m ago•0 comments

AI agents broke into 27 online retailers for $25 a company

https://trustboundarystudio.com/posts/ai-agents-retail-2026/
2•trustboundaryst•48m ago•1 comments

Show HN: WriteNative – correct, natural English in any Mac app

https://writenative.app/
3•dengzhaofun•56m ago•0 comments

The economic folly of free buses

https://economist.com/finance-and-economics/2026/09/10/the-economic-folly-of-free-buses
2•andsoitis•58m ago•2 comments

TheScuderia.net – The online voice of Ferrari F1

https://www.thescuderia.net/
1•xeonmc•1h ago•0 comments

Decision 3.0: open, multimodal SOTA decision models from 0.6B to 27B

https://huggingface.co/collections/vllm-sr/decision-30
2•justacoolname•1h ago•0 comments

Harness Learning Enables Generalizable Test-Time Adaptation

https://arxiv.org/abs/2609.35738
1•gmays•1h ago•0 comments

Show HN: Apple Docs 2.0 MCP – Apple's developer docs and WWDC for coding agents

https://github.com/mishafyi/Apple-Docs-2.0-MCP
1•mshapalov•1h ago•0 comments

Vision Personal Growth · Goals · Habits

https://vision-1-0-peach.vercel.app/
1•ghada_alani•1h ago•0 comments

Show HN: Gen-system, parser facts about source code for local LLMs

https://github.com/hpdkhoa/gen-system
3•khoahpd•1h ago•2 comments

Generative Semantics

https://en.wikipedia.org/wiki/Generative_semantics
1•suopspaces•1h ago•0 comments

What's Dragging Down AI Efficiency? The 'Verification Tax.'

https://www.nytimes.com/2026/10/10/business/dealbook/ai-verification-tax-rework.html
3•ripe•1h ago•3 comments

Gasoline-only vehicles below 50% of global new-vehicle sales first half of 2026

https://electrek.co/2026/10/05/gas-cars-fall-below-50-percent-global-new-car-sales/
2•tmellon2•1h ago•1 comments

Mathematicians invented a knitting stitch that stops mistakes from spreading

https://www.scientificamerican.com/article/mathematicians-invented-a-knitting-stitch-that-stops-m...
3•rdmuser•1h ago•1 comments

As AI Closed in on 'Unique Games' Proof, Researchers Raced to Beat the Machines

https://www.quantamagazine.org/as-ai-closed-in-on-unique-games-proof-researchers-raced-to-beat-th...
2•nsoonhui•1h ago•0 comments