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

Proposed data centre would release 23 Hiroshima-sized atomic bombs of energy/day

https://www.cbc.ca/news/canada/edmonton/wonder-valley-slcn-court-physicist-9.7403677
1•BiraIgnacio•3m ago•0 comments

Postmortem on Claude Code Cursor extension hack

https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cur...
1•soundworlds•7m ago•1 comments

Ex-o2 FRITZ Box 6660 Cable: enabling LAN 1 as WAN via a bootloader variable

https://www.alpersaritas.com/writing/fritzbox-6660-lan1-wan/
1•lprsrts•12m ago•0 comments

Sub-microsecond SEC 15c3-5 risk checks on AWS F2 via FPGA MMIO

https://github.com/joeiko3424-svg/oikonomia-benchmarks
1•oikonomiaarchit•12m ago•0 comments

Why Agent Memory Benchmarks Need a Reproducible Evaluation Pipeline

https://x.com/AgentMemoryL/
1•SndOfViento•16m ago•0 comments

Trump Demands a Cut of Alina Habba's $50M Pardon Deal

https://newrepublic.com/post/217360/donald-trump-alina-habba-50-million-pardon
2•techlover14159•16m ago•2 comments

Iain McGilchrist: Great discoveries are not made following the scientific method

https://iai.tv/articles/iain-mcgilchrist-great-discoveries-are-not-made-by-following-the-scientif...
1•pella•18m ago•1 comments

Reason you should still learn Machine Learning/Deep Learning, etc.

https://hackertube.org/watch/P_fHJIYENdI
1•thomasjeff1•19m ago•0 comments

Show HN: The Agentic State

https://agenticstate.dev/
1•arionhardison•25m ago•0 comments

Katamari Damacy but it's The Met collection

https://katamari.vaguespac.es/
1•thebigship•27m ago•0 comments

Ask for Advice about JavaScript

1•zzyijiz•30m ago•4 comments

Silicon Socialism – East Germany's Microchip Race

https://www.youtube.com/watch?v=n7EkBl02iXk
1•coldnose•31m ago•0 comments

New AI-driven malware feeds stolen data to Claude to rank victims' assets

https://www.tomshardware.com/tech-industry/cyber-security/new-ai-driven-windows-malware-feeds-sto...
1•NordStreamYacht•31m ago•0 comments

ChatGPT: Chat and Work are coming together in one experience

1•beatcracker•32m ago•0 comments

Show HN: Complete Trading Chart engine for web

https://tradecanvas.dev/
1•bonguynvan•42m ago•0 comments

WeVisCut: The Whole Editing Room in One Agent, from Narration to Long-Form Video

https://tencent.github.io/WeVisCut
2•everygen_studio•43m ago•0 comments

A Powerful Mosquito-Hunting Laser Uses A.I. To Zap Winged Pests

https://www.nytimes.com/2026/10/30/business/mosquito-laser-ai.html
2•lxm•47m ago•0 comments

F/OSS Comics #13: BSD Unix, Part 3 – The Beginning of BSD Unix

https://fosscomics.com/posts/13.%20BSD%20Unix%20Part%203%20-%20The%20Beginning%20of%20BSD%20Unix/
6•joonehur•49m ago•0 comments

How to Model "Taarof" with AI [video]

https://youtu.be/X7vf7koPxKg?si=qTC7OOblJyWjibv6&t=829
1•armanj•56m ago•0 comments

AI fan wikis riddled with errors are muddying the waters of games culture

https://www.eurogamer.net/ai-fan-wikis-errors-complicating-games-culture
11•rdmuser•1h ago•1 comments

Junk debt rout sparks 'bloodbath' for credit investors

https://www.ft.com/content/fdc9a85d-d2c4-465f-99ca-609d68b6d443
2•angry_impala•1h ago•0 comments

AI Can Write More of the Code. We Still Have to Engineer the System

https://picon.dev/en/publications/ai-assisted-engineering/
22•devpicon•1h ago•7 comments

Optical Circuit Switch Technology Built on Low-Loss Silicon Photonics Platform

https://www.psiquantum.com/news-import/psiquantum-unveils-optical-circuit-switch-technology-built...
1•gmays•1h ago•0 comments

Zhipu AI: China's Enterprise AI Champion [video]

https://www.youtube.com/watch?v=y5YKL75e78Y
1•thatslast•1h ago•0 comments

An insecure world built on trust stores

https://eclecticlight.co/2026/11/01/last-week-on-my-mac-an-insecure-world-built-on-trust-stores/
1•DASD•1h ago•1 comments

Bones may release proteins that slow aging and extend life span

https://www.science.org/content/article/bones-may-release-proteins-slow-aging-and-extend-life-span
3•EA-3167•1h ago•0 comments

OS X crammed onto an HTC Shift tablet (2010)

https://liliputing.com/os-x-crammed-onto-an-htc-shift-tablet/
1•josh-wrale•1h ago•0 comments

Climate Data Scientist Explains What the Numbers Mean

https://atmos.earth/climate-solutions/this-climate-data-scientist-explains-what-the-numbers-reall...
2•bryanrasmussen•1h ago•0 comments

Show HN: Skep – live cross-device sessions for AI coding agents

https://skepagent.com/
1•Krisneo•1h ago•0 comments

F Stop (Portal prequel) leak

https://www.youtube.com/watch?v=mihs6K2ynCs
1•nailer•1h ago•0 comments