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

Ranking the Most Brilliant Birds with Math and Data

https://moultano.wordpress.com/2026/08/14/fairly-ranking-the-most-brilliant-birds/
1•moultano•3m ago•0 comments

Carr-Benkler Wager Revisited (2012)

https://archive.blogs.harvard.edu/ybenkler/2012/05/07/on-the-carr-benkler-wager/
1•Sir_Twist•3m ago•0 comments

Apple/NeXT Human Interface Guidelines Collection

https://github.com/gingerbeardman/apple-human-interface-guidelines/
1•CharlesW•7m ago•0 comments

Ask HN: Can you still tell AI-generated text apart in your own language?

1•h_mirin•7m ago•0 comments

Burning Down Yosemite and the Redwoods

https://steady.substack.com/p/fire-storm
1•BallardNomads•9m ago•0 comments

Frasier Fantasy: The Director's Cut

https://edward-la-barbera.itch.io/frasier-fantasy
1•CharlesW•9m ago•0 comments

What US Space Force Does (WSJ Original)

https://www.youtube.com/watch?v=RGcRuej-LVE
1•mudil•12m ago•0 comments

Google Buys Spirit Data for $10M

https://airlinegeeks.com/2026/08/17/report-google-buys-spirit-data-for-10m/
1•echelon•13m ago•0 comments

Rysh – an AI harness where Claude and Codex agents work as a team (Go)

https://github.com/rysh-ai/rysh-cli-code
1•halilagin•15m ago•0 comments

Why Aging May Be a Program, Not a Breakdown

https://www.quantamagazine.org/why-aging-may-be-a-program-not-a-breakdown-20260814/
3•ibobev•16m ago•0 comments

Building an AI Text Detector from Scratch

https://magazine.sebastianraschka.com/p/ai-detector-from-scratch
1•ibobev•17m ago•0 comments

We Should Use Instrumented Profiling Scopes More

https://mropert.github.io/2026/08/13/instrumented_profiling_scopes/
1•ibobev•17m ago•0 comments

I Bought and Restored "Old" Technology to Prove the Economy Is Imploding [video]

https://www.youtube.com/watch?v=C_0xBbEFjLk
1•rglover•18m ago•0 comments

Flock cameras haven't improved Atlanta's crime clearance rates

https://atlpresscollective.com/2026/07/28/flock-cameras-atlanta-clearance-rates/
1•jimt1234•18m ago•0 comments

macOS 27 Golden Gate features redesigned traffic light window controls

https://9to5mac.com/2026/08/17/macos-27-golden-gate-beta-6-features-redesigned-traffic-light-wind...
2•akyuu•20m ago•1 comments

Speeding Up the Plush Garbage Collector

https://pointersgonewild.com/2026-08-17-speeding-up-the-plush-garbage-collector/
1•matt_d•20m ago•0 comments

Cumora, a cross-platform team chat where AI agents work alongside humans

https://github.com/yetone/cumora
2•jinqueeny•21m ago•0 comments

Autists Posts to Moltbook

https://www.moltbook.com/post/134f96ff-e275-45db-a52c-561b68b8c923
1•andytratt•21m ago•1 comments

Skills from a Smart Bear

https://skills.asmartbear.com/
1•duck•21m ago•0 comments

Identity Theft, Credit Reports, and You

https://www.kalzumeus.com/2017/09/09/identity-theft-credit-reports/
1•Anon84•23m ago•0 comments

Con Kolivas Revives -ck Patches & MuQSS To Improve Linux Desktop Responsiveness

https://www.phoronix.com/news/Con-Kolivas-Linux-Patches-2026
1•voxadam•24m ago•0 comments

Sources: NBA has no evidence Ballmer funneled money to Leonard via sponsors

https://www.espn.com.au/nba/story/_/id/49639157/nba-la-clippers-aspiration-investigation-steve-ba...
2•edfsadfer•24m ago•0 comments

Cursor Origin is now live

https://xcancel.com/cursor_ai/status/2089399057659596847
1•SpyCoder77•24m ago•0 comments

Examining RFK Jr.'S Role in the Measles Outbreak

https://www.nationalreview.com/news/examining-rfk-jr-s-role-in-the-measles-outbreak/
3•petethomas•25m ago•0 comments

U.S. data-center capacity may nearly double by 2028

https://aicharts.grok.me/c/data-center-power
1•echohive42•26m ago•0 comments

Russia fires economist over Ukraine war warning

https://www.ft.com/content/a1b720e3-e1e6-4a13-bdb0-9cc27399ceb4
1•petethomas•27m ago•0 comments

Linux 7.2 Released

https://kernelnewbies.org/Linux_7.2
1•diegocg•29m ago•1 comments

AI writes dead code – the Go team's deadcode tool finds it in one command

https://towardsdev.com/how-to-find-and-remove-the-dead-code-your-agent-wrote-752eb1e738d0?sk=283d...
1•cheikhdev•30m ago•0 comments

Why Is It So Hard to Build a Transformer?

https://www.nytimes.com/interactive/2026/08/17/magazine/transformers-power-electric-grid.html
1•donohoe•33m ago•0 comments

MidWestWhips

http://www.midwestwhips.com/index.html
3•sickophancy•36m ago•0 comments