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

MCP tool that catches AI-agent scope creep

https://github.com/Naveja00/OverReach
1•Naveja•1m ago•0 comments

Understanding the Go Runtime: The Reflect Package

https://internals-for-interns.com/posts/go-runtime-reflect/
1•valyala•1m ago•0 comments

What does it mean when the bottom bit of my HMODULE is set?

https://devblogs.microsoft.com/oldnewthing/20260619-00/?p=112447
1•ibobev•4m ago•0 comments

Command and Conquer – Westwood's hit strategy game is coming to the Atari ST

https://www.indieretronews.com/2026/06/command-conquer-westwoods-hit-strategy.html
2•ibobev•4m ago•0 comments

The Goldilocks Principle in Fantasy Strategy

https://www.filfre.net/2026/06/the-goldilocks-principle-in-fantasy-strategy/
1•ibobev•6m ago•0 comments

The Surprising New Arms Dealer to the World

https://www.politico.com/news/magazine/2026/06/20/south-korea-weapons-dealer-trump-00959559
1•JumpCrisscross•8m ago•0 comments

Self Balancing Inverted Pendulum

https://github.com/chrisdoble/self-balancing-inverted-pendulum
2•yeknoda•9m ago•0 comments

16-year-old SATA II SSD survives 1 petabyte of writes, 25x the drive's rating

https://www.tomshardware.com/pc-components/ssds/16-year-old-sata-ii-ssd-survives-1-petabyte-of-wr...
3•giuliomagnifico•9m ago•0 comments

Ask HN: Need advice on distributing and testing what I build

2•darth-pixit•13m ago•0 comments

Google Has Added Agentic Browsing to PageSpeed Insights

https://pagespeed.web.dev/analysis/https-hawksley-dev/bo27z46k5x
1•ethanhawksley•13m ago•1 comments

Lines-of-code considered helpful (or we stop taking sick peoples temperatures)

https://legostormtroopr.substack.com/p/lines-of-code-considered-helpful
1•legostormtroopr•16m ago•0 comments

Spotting Mushrooms

https://verfassungsblog.de/spotting-mushrooms/
1•jruohonen•27m ago•0 comments

Building a Dense Agentic AI CPU Rack Today

https://www.servethehome.com/building-a-dense-agentic-ai-cpu-rack-amd-dell-today/
1•ksec•33m ago•1 comments

Temporary Cloudflare Accounts for AI Agents

https://blog.cloudflare.com/temporary-accounts/
2•farhadhf•34m ago•0 comments

AI that can find the location of images

https://geoaxis.ai
2•GeoAxisAI•35m ago•0 comments

Large Language Models Hack Rewards, and Society

https://arxiv.org/abs/2606.04075
2•sva_•35m ago•0 comments

How to sync messages of Claude Code extension in VS Code and Claude Code app?

https://github.com/budhasantosh010/claude-code-session-bridge
1•realsanb•36m ago•0 comments

„We all leave digital footprints on the internet"

https://www.mpg.de/26430251/interview-troncoso-ueberwachung
1•jruohonen•41m ago•1 comments

Apple patches high-severity eavesdropping vulnerability in Beats Studio Buds

https://arstechnica.com/apple/2026/06/apple-patches-high-severity-eavesdropping-vulnerability-in-...
1•joozio•49m ago•0 comments

Local Models, Friction and Struggle

https://garden.azl.au/ai/local-models/local-models-friction-struggle
1•neurodivergent•52m ago•1 comments

Safe SIMD in Rust, even on the inside

https://shnatsel.medium.com/safe-simd-in-rust-even-on-the-inside-c6f1ff381828
1•g0xA52A2A•52m ago•0 comments

As China gorges on homegrown foie gras, France faces a new rival

https://www.reuters.com/world/asia-pacific/china-gorges-homegrown-foie-gras-france-faces-new-riva...
2•JumpCrisscross•54m ago•2 comments

Mochallama

https://deemwar-products.github.io/mochallama/
1•deemwar•56m ago•0 comments

Mack.ns.cloudflare.com

https://blog.cloudflare.com/welcome-to-connectivity-cloud/
1•SajjuRoy•57m ago•0 comments

Bootimus – A Self-Contained PXE and HTTP Boot Server

https://bootimus.com
2•car•58m ago•0 comments

We Ran the Numbers. Remote Work Is Bad for Us

https://www.nytimes.com/2026/06/17/opinion/remote-work-depression.html
2•Anon84•59m ago•0 comments

Apple unifies device management in devicectl: Impact on iOS test automation and

https://bitrise.io/blog/post/wwdc-2026-device-hub-and-what-it-means-for-ci-cd
1•birdculture•1h ago•0 comments

CSSQuake

https://cssquake.com/
4•msalsas•1h ago•1 comments

Enthusiastic Fear

https://patent.dev/enthusiastic-fear/
2•funktionslust•1h ago•0 comments

The Classic Movie That Was Nearly Destroyed by a Single Line of Code

https://www.wsj.com/business/media/toy-story-5-saved-pixar-78e29161
2•impish9208•1h ago•1 comments