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

SDLC is a power tool, not a compliance document

https://blog.robbowley.net/2026/05/07/your-sdlc-is-a-power-tool-not-a-compliance-document/
1•8organicbits•3m ago•0 comments

Anthropic and the Department of War

https://www.hyperdimensional.co/p/clawed
1•mooreds•3m ago•0 comments

Summer of Math Expositions(2021-2025) – 3b1B archive

https://some.3b1b.co/archive?category=video&year=2021&page=1
1•num42•6m ago•0 comments

Archive.today requires scanning a QR code on your phone to use

https://archive.fo
1•Cider9986•6m ago•0 comments

Show HN: AnamDB – An AI-native, differentiable Datalog engine written in Rust

https://github.com/jam5991/anam
1•jam5991•7m ago•1 comments

Agentic Coding at ClickHouse

https://clickhouse.com/blog/agentic-coding
1•ubolonton_•8m ago•0 comments

It's time to stop using SMS, here's why [video]

https://www.youtube.com/watch?v=B9BWXvn-rB4
1•Cider9986•8m ago•0 comments

Anthropic's Mythos Threw the White House AI Strategy into Chaos

https://www.wsj.com/tech/ai/trump-ai-anthropic-mythos-regulation-2378971f
1•RyanShook•8m ago•0 comments

Ocean2: Data centers powered by ocean waves [video]

https://www.youtube.com/watch?v=Q7Pmgq2JKbI
1•Aeroi•11m ago•1 comments

Where Are You in the Context Supply Chain?

https://educatedguesser.substack.com/p/where-are-you-in-the-context-supply
1•mfiguiere•15m ago•0 comments

IMF warns new AI models risk 'systemic' shock to finance

https://www.ft.com/content/103d73d3-7119-4dee-8c47-b3fc62d2f1e6
2•petethomas•15m ago•0 comments

Using AI for Just 10 Minutes Might Make You Lazy and Dumb, Study Shows

https://www.wired.com/story/using-ai-negative-impact-thinking-problem-solving-study/
3•gnabgib•20m ago•0 comments

Show HN: WordPress WebSocket Relay in Rust with Yjs CRDT Provider for WP 7.0

https://wpsignal.io/
1•jaredrethman•21m ago•0 comments

Show HN: HeatSpectra: Realtime 3D Surface Heat Simulation

https://github.com/tsun3doku/HeatSpectra
1•tsun3doku•25m ago•0 comments

Roche to Buy PathAI for Up to $1.05B to Bolster AI Diagnostics Tools

https://www.wsj.com/business/deals/roche-to-buy-pathai-for-up-to-1-05-billion-to-bolster-ai-diagn...
1•SaaSasaurus•27m ago•0 comments

AniTroves – An anime database with a custom LLM-based discovery hub

1•anitroves•30m ago•0 comments

YouTube aspect ratios – no way to fix it?

1•mr-pink•31m ago•1 comments

Show HN: Agentctl, a local control plane for coding agents

https://github.com/chocks/agentctl
1•chocks•34m ago•0 comments

I made a simple, free family tree app that handled my 300 person, 5 gen. family

https://www.familytreeiq.com
1•mknweb•34m ago•2 comments

Upper bound for AI output is based on your taste/exposure

1•yehiaabdelm•43m ago•0 comments

Best Buy mandating four days in office for headquarters employees

https://www.startribune.com/best-buy-hybrid-four-days-change-shift-mandate-in-office/601828733
2•bjhess•43m ago•1 comments

I recently started a small experimental project recreating Star Fox 64

https://foxremake.com/star-fox-64-remake/
2•951560368•50m ago•4 comments

Proposed Revised Mailing Standards for Firearms

https://www.federalregister.gov/documents/2026/04/02/2026-06376/revised-mailing-standards-for-fir...
2•petethomas•52m ago•0 comments

AI Contributions to CPAN: The Copyright Question

https://blogs.perl.org/users/todd_rinaldo/2026/04/ai-contributions-to-cpan-the-copyright-question...
2•DASD•52m ago•0 comments

Mathematics Subject Classification (2020)

https://mathscinet.ams.org/mathscinet/msc/msc2020.html
2•nill0•57m ago•0 comments

Show HN: NyaayWatch – Observability layer for the Indian judiciary

https://nyaaywatch.in
2•Rudraksh06•58m ago•0 comments

The Privacy of Apple Location Services and Analytics

https://duti.dev/randoms/wip-location-services/
6•Cider9986•1h ago•0 comments

Jakarta airport's official site blocks international visitors, so I built my own

https://blog.terrydjony.com/i-built-a-better-cgk-airport-website/
3•terryds•1h ago•0 comments

A Dangerous New Attack on Press Freedom

https://www.theatlantic.com/ideas/2026/05/kash-patel-fitzpatrick-fbi-investigation/687077/
9•petethomas•1h ago•3 comments

Net May 15 Starship • Flight 12

https://spaceflightnow.com/launch-schedule/
3•bookmtn•1h ago•1 comments