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•8mo 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•8mo 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•8mo 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•8mo 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•8mo 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•8mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

Mail: RFC822:Address: regexp-based address validation (2012)

https://pdw.ex-parrot.com/Mail-RFC822-Address.html
1•vismit2000•31s ago•0 comments

Quantum physicists create largest ever 'superposition'

https://www.nature.com/articles/d41586-026-00177-9
1•typeofhuman•1m ago•0 comments

Show HN: A condo review site for Bangkok renters to avoid deposit scams

https://condoreviewsthailand.com
1•digi_wares•4m ago•0 comments

Finland sets tougher guidelines: No social media or smartphones for under-13s

https://yle.fi/a/74-20205877
1•brylie•11m ago•0 comments

Amazon Gears Up to Ax Thousands More Corporate Employees

https://finance.yahoo.com/news/amazon-gears-ax-thousands-more-224656699.html
1•_____k•12m ago•0 comments

Workplace rights agency scraps anti-harassment guidance

https://apnews.com/article/eeoc-harassment-workplace-gender-trump-lucas-lgbtq-0ac048763668ae4f894...
1•petethomas•16m ago•0 comments

Vibe Coding Kills Open Source

https://arxiv.org/abs/2601.15494
3•50kIters•17m ago•0 comments

Why External AI Reasoning Breaks Articles 12 and 61 by Default

https://www.aivojournal.org/why-external-ai-reasoning-breaks-articles-12-and-61-by-default/
1•businessmate•18m ago•1 comments

Show HN: ChartScout – Crypto chart pattern detection under 20 seconds

https://chartscout.io
1•chartscout•18m ago•0 comments

The Universal Pattern Popping Up in Math, Physics and Biology

https://www.quantamagazine.org/in-mysterious-pattern-math-and-nature-converge-20130205/
1•kerim-ca•25m ago•0 comments

From Sketch to Masterpiece: Understanding Stable Diffusion Img2Img

2•bozhou•35m ago•0 comments

How do I fight 250 duplicate Amazon listings with fake reviews?

https://travelhead.medium.com/amazons-dirty-secret-the-chinese-marketplace-manipulation-destroyin...
2•travelhead•36m ago•0 comments

ClaudePad

https://github.com/marshallrichards/ClaudePad
2•ray__•39m ago•0 comments

I built a light that reacts to radio waves [video]

https://www.youtube.com/watch?v=moBCOEiqiPs
6•codetheweb•40m ago•0 comments

One year of Kash Patel running the FBI

https://www.nytimes.com/interactive/2026/01/22/magazine/trump-kash-patel-fbi-agents.html
3•osnium123•40m ago•2 comments

CEOs Say AI Is Making Work More Efficient. Employees Tell a Different Story

https://www.wsj.com/lifestyle/workplace/ceos-say-ai-is-making-work-more-efficient-employees-tell-...
11•1vuio0pswjnm7•43m ago•2 comments

"A public origin record for a phase‑resonance hybrid computing architecture"

1•LUMENPIXEL•45m ago•0 comments

Amazon planning job cuts next week after axing 14,000 due to AI: report

https://nypost.com/2026/01/22/business/amazon-planning-thousands-of-job-cuts-next-week-after-axin...
5•1vuio0pswjnm7•45m ago•1 comments

Tell HN: Cursor agent force-pushed despite explicit "ask for permission" rules

4•xinbenlv•46m ago•0 comments

ChatGPT gives answers. Agentic AI makes decisions

https://chungmoo.substack.com/p/chatgpt-gives-answers-agentic-ai
1•chungmoo•48m ago•0 comments

GM announces end of Chevy Bolt (for the second time)

https://techcrunch.com/2026/01/22/gm-to-end-chevy-bolt-ev-production-next-year-move-china-made-bu...
1•LanceJones•54m ago•0 comments

I Asked 4 AIs to Define a Fake Term. Only 1 Refused to Lie

https://chungmoo.substack.com/p/i-asked-4-ais-to-define-a-fake-term
2•chungmoo•55m ago•0 comments

Software sell-off sparked by AI sets stage for potential big year of M&A

https://www.cnbc.com/2026/01/22/selloff-in-software-from-ai-sets-stage-for-potential-big-year-of-...
1•1vuio0pswjnm7•55m ago•0 comments

24 Hour Timelapse of all FedEx Airplanes in the USA (2009) [video]

https://www.youtube.com/watch?v=0xEczrGIy08
1•radeeyate•56m ago•0 comments

Robotics Needs World Models

https://www.signalfire.com/blog/missing-piece-in-robotics-a-world-model
1•zviugfd•57m ago•0 comments

PolyShapr

https://chambercode.com/music/polyshapr/
1•gregsadetsky•59m ago•0 comments

The US national debt will soon be growing faster than the economy itself

https://fortune.com/2026/01/22/how-big-national-debt-when-recession-financial-crisis-could-hit/
6•testing22321•59m ago•1 comments

US officially exits World Health Organization

https://abcnews.go.com/Health/us-officially-exits-world-health-organization-accusing-agency/story...
6•testing22321•1h ago•1 comments

United States Completes WHO Withdrawal

https://www.hhs.gov/press-room/united-states-completes-who-withdrawal.html
55•Swizec•1h ago•7 comments

What Is Control Flow Analysis for Lambda Calculus? [audio]

https://podcasts.apple.com/us/podcast/what-is-control-flow-analysis-for-lambda-calculus/id1493036...
1•matt_d•1h ago•1 comments