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

'News will find me' mindset makes people trust algorithms and online networks

https://www.psu.edu/news/bellisario-college-communications/story/news-will-find-me-mindset-makes-...
1•thunderbong•35s ago•0 comments

Async I/O in Zig 0.16, today

https://lalinsky.com/2026/05/11/async-io-in-zig-016-today.html
1•signa11•3m ago•0 comments

Reasons to Use Std:SIMD

https://github.com/NoNaeAbC/std_simd
1•quasigloam•11m ago•0 comments

AI Faceless Video Generator for TikTok, Shorts and Reels

https://faceless-video.com/
1•duanhjlt•11m ago•0 comments

Ultime Western

http://www.ultimewestern.com/
1•hyperific•13m ago•0 comments

Fourth Television Network

https://en.wikipedia.org/wiki/Fourth_television_network
1•Ariarule•13m ago•0 comments

The Blind Witness: AI observer with fu

https://theairtgroup.com/blind-witness.html
1•simonaitchison•15m ago•0 comments

TheArchiveBase – A Lightweight Distributed Search Engine

https://thearchivebase.com/
1•tanvirredwan•16m ago•1 comments

Trillions of miles of data: Your car is spying on you

https://www.bbc.com/future/article/20260513-your-car-is-spying-on-you-its-about-to-get-worse
1•1659447091•17m ago•0 comments

Fly.io is getting rid of GPU-accelerated machines

https://fly.io/docs/gpus/
3•abound•19m ago•1 comments

I Rewrote My Project from Clojure to Gleam [video]

https://www.youtube.com/watch?v=iEP6pWmxWeI
1•TheWiggles•20m ago•0 comments

SF vibes are frenetic over the divide in outcomes and career uncertainty

https://www.techmeme.com/260516/p9
2•danorama•32m ago•1 comments

SeeFlow – Architecture diagrams that run

https://seeflow.dev
1•tuongaz•34m ago•0 comments

Lord of the Flies: A Harmful Distortion of Children's Nature

https://petergray.substack.com/p/114-lord-of-the-flies-a-harmful-distortion
1•Ariarule•36m ago•0 comments

Unmanned lab opens with robots at work as researchers push AI, automation

https://japantoday.com/category/tech/unmanned-lab-opens-with-robots-at-work-as-researchers-push-a...
1•pseudolus•40m ago•0 comments

Eric Weinstein: "I Was Wrong About UFOs " [video]

https://www.youtube.com/watch?v=ZBjJTj_ZFXU
1•keepamovin•50m ago•0 comments

Ccstory – Weekly recap of what you did in Claude Code

https://github.com/atomchung/ccstory
1•atomtw•55m ago•0 comments

Bear spray is exploding in the trash near Yellowstone National Park

https://www.sfgate.com/national-parks/article/exploding-bear-spray-yellowstone-22244713.php
7•turtlegrids•56m ago•3 comments

2026 will be a HVAC contractor bloodbath

https://www.reddit.com/r/heatpumps/s/APgJ68ZSyz
2•ssuds•1h ago•0 comments

LLMs and the Epistemic Apocalypse

https://haversine.substack.com/p/the-slow-creep-of-epistemic-apocalypse
1•MakeAJiraTicket•1h ago•1 comments

How to buy cheap Claude tokens in China

https://www.chinatalk.media/p/how-to-buy-cheap-claude-tokens-in
2•RyanShook•1h ago•0 comments

Science Behind Too Much Homework for Lower School Kids

https://restingrichface.substack.com/p/im-quitting-my-third-graders-homework
2•_RRF•1h ago•1 comments

Ascetic Computing

https://ratfactor.com/ascetic-computing
2•RohanAdwankar•1h ago•0 comments

Zhengkid/AutoTTS: Agentic Discovery for Test-Time Scaling

https://github.com/zhengkid/AutoTTS
2•gmays•1h ago•0 comments

Monero Stats: An aggregate of payment data by businesses that accept Monero

https://monerostats.org/
2•Cider9986•1h ago•2 comments

Four Decisions: The Divergent Choices That Define a Life

https://gadallon.substack.com/p/four-decisions-the-divergent-choices
1•Murskautuminen•1h ago•0 comments

Basalt could be the key to greener and cheaper cement

https://news.ucsb.edu/2026/022568/basalt-could-be-key-greener-and-cheaper-cement
1•littlexsparkee•1h ago•0 comments

Don't Outsource the Learning

https://addyosmani.com/blog/dont-outsource-learning/
2•cdrnsf•1h ago•0 comments

Show HN: SoccQR – Lost and Found Labels for Soccer Balls / Gamified Training Log

https://soccqr.com
1•zarie•1h ago•0 comments

The Left Hand of Darkness (1969)

https://en.wikipedia.org/wiki/The_Left_Hand_of_Darkness
2•maxall4•1h ago•0 comments