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

MarketNow

https://marketnow.site
1•eddyflores•1m ago•1 comments

Linux Network Performance Parameters

https://github.com/leandromoreira/linux-network-performance-parameters
1•grajmanu•3m ago•0 comments

Lawrence M. Krauss -A Universe from Nothing

https://www.youtube.com/watch?v=vwzbU0bGOdc
1•grajmanu•4m ago•0 comments

Australia's competition regulator sues Amazon over Prime subscription terms

https://www.cnbc.com/2026/06/30/australias-competition-regulator-takes-amazon-to-court-over-alleg...
1•1vuio0pswjnm7•6m ago•0 comments

AI Specialists Ready to Transform Your Workflow

https://github.com/msitarzewski/agency-agents
2•grajmanu•10m ago•0 comments

AI Data Centers Have Been Great for the Steel Industry, Now a Power Crisis Looms

https://www.wsj.com/business/energy-oil/ai-data-centers-power-competition-steel-48a17dbd
2•1vuio0pswjnm7•13m ago•0 comments

Can Architecture Ever Save Us from Sickness?

https://thereader.mitpress.mit.edu/can-architecture-ever-save-us-from-sickness/
2•the-mitr•13m ago•0 comments

ICE Tracks Down Woman to Force Her to Delete Instagram Post

https://newrepublic.com/post/212340/ice-poll-worker-election-delete-instagram-post
4•HotGarbage•15m ago•0 comments

300k-Year-Old Cave Site Explored in Northern Israel

https://archaeology.org/news/2026/06/18/300000-year-old-cave-site-explored-in-northern-israel/
4•andsoitis•15m ago•0 comments

Tracking (and predicting) the World Cup in a circle

https://www.saj.ad/2026/wc
2•dajas•18m ago•0 comments

Aera: Cross Platform Agentic Browser

https://getaera.app
2•handfuloflight•19m ago•0 comments

The Meadows of Medieval Summer

https://www.historytoday.com/archive/out-margins/meadows-medieval-summer
2•benbreen•23m ago•0 comments

Britons ordered to remove air conditioning from homes in 40C heat under Net Zero

https://www.telegraph.co.uk/money/consumer-affairs/air-conditioning-torn-from-homes-under-net-zer...
3•dmitrygr•25m ago•1 comments

Closer to Rude Than Snide: An Interview with Leo Robson

https://www.theideasletter.org/essay/closer-to-rude-than-snide/
2•lermontov•34m ago•0 comments

Show HN: We made an Audio ML sharing platform

https://www.noysr.com/explore
2•bigboi6969•36m ago•0 comments

New EV-makers keep appearing in China

https://www.economist.com/business/2026/06/24/strange-new-ev-makers-keep-appearing-in-china
4•andsoitis•40m ago•1 comments

Study suggests most Americans would be healthier without daylight saving time

https://med.stanford.edu/news/all-news/2025/09/daylight-saving-time.html
5•andsoitis•45m ago•0 comments

Fastllm: A LLM inference library that runs DeepSeek-V4 with 10GB VRAM

https://github.com/ztxz16/fastllm
3•nogajun•46m ago•0 comments

Bandcamp has laid off most of their engineers

https://bsky.app/profile/grmnygrmny.bandcamp.com/post/3mpgvo7l2v22t
12•ulrikrasmussen•50m ago•0 comments

Read Banned Books

https://www.penguinrandomhouse.com/banned-books/
3•hkhn•53m ago•0 comments

Artifacts dating back 400,000 years show ‘complex and rich’ pre-human society

https://www.cnn.com/2026/06/29/science/israel-prehistoric-cave-scli-intl
5•breve•57m ago•0 comments

The end of the engineer. The rise of the operator

https://getoperators.ai/manifesto
2•pro_methe5•59m ago•0 comments

Memory in the Age of AI Agents (Survey Paper)

https://arxiv.org/abs/2512.13564
2•thoughtpeddler•1h ago•0 comments

"It's Hard to Eval" Is a Product Smell

https://hamel.dev/blog/posts/eval-smell/
5•call-me-al•1h ago•0 comments

Snap to AI – One-Keystroke Screenshots to Claude, ChatGPT, etc. (macOS)

https://snaptoai.app
2•threeten•1h ago•0 comments

Free Google Docs Resume Templates to Copy and Edit – ResumeDocs

https://googledocsresumetemplate.com/google-docs-resume-template/
2•Hardd•1h ago•0 comments

AI Story Generator for Game Masters – Free D&D and RPG Tools

https://aistorygenerator.work
3•Hardd•1h ago•0 comments

Show HN: Drifty – AI Focus agent shuts down distractions tabs while you work

https://drifty.so/
2•Ari_Shin•1h ago•0 comments

Zuckerberg Urges Meta to Explore Working with Polymarket and Kalshi

https://www.nytimes.com/2026/06/26/technology/zuckerberg-meta-polymarket-kalshi.html
6•CaptainZapp•1h ago•3 comments

Cost calculators for common home renovation projects

https://costto.build/
2•way007•1h ago•0 comments