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

No as a Service on two potatoes and a grater

https://thenextbug.com/no/?i=105
1•emeraldd•49s ago•0 comments

Tracker Detector

https://chromewebstore.google.com/detail/tracker-detector-—-live-n/obhogdjieenlhmpmlnhaiodpleon...
1•skmadd•5m ago•0 comments

Texas DPS finds Flock surveillance violated state law operating without license

https://www.houstonchronicle.com/news/houston-texas/article/flock-camera-investigation-22096147.php
1•stephenhuey•9m ago•1 comments

You can now mount HuggingFace Storage Buckets as local filesystems

https://github.com/huggingface/hf-mount
1•p0u4a•9m ago•0 comments

Top climate scientist Kate Marvel explains why she resigned from NASA

https://www.scientificamerican.com/article/top-climate-scientist-kate-marvel-just-resigned-from-n...
2•cdrnsf•12m ago•0 comments

What Counts as Authorship in AI-Generated Music?

https://substack.com/@wardmercer/note/p-192206062
1•DamageCopy•15m ago•0 comments

The Forbidden Fruit of AI

https://techonion.org/the-forbidden-fruit-of-ai/
1•TechOnionKing•15m ago•0 comments

The Ghost Internet

https://techonion.org/the-ghost-internet/
1•TechOnionKing•15m ago•0 comments

People who obsessively exercise are boring

https://mathbabe.org/2014/04/14/people-who-obsessively-exercise-are-boring/
1•brailsafe•19m ago•0 comments

Anthropic wins preliminary injunction in DoD fight on 1A

https://www.cnbc.com/2026/03/26/anthropic-pentagon-dod-claude-court-ruling.html
4•m-hodges•20m ago•0 comments

Apple Discontinues the Mac Pro

https://www.thurrott.com/mobile/mac-and-macos/334274/apple-discontinues-the-mac-pro
3•ingve•21m ago•0 comments

Monetization needs its Platform Engineering moment

https://www.withsahel.com/blog/monetization-needs-platform-engineering-moment
1•iajiboye•23m ago•0 comments

Postmortem of March 2026 Archive of Our Own Downtime

https://archiveofourown.org/works/81635876
1•teddyh•29m ago•0 comments

US Treasury plans to put Trump's signature on new paper currency

https://apnews.com/article/trump-currency-signiture-treasury-first-d919877e39f907eba1172a07920ea80e
2•geox•29m ago•0 comments

Know where your AI budget is going

https://www.flowstate.inc/
1•ahmadassaf•30m ago•0 comments

OpenChamber – Desktop and web interface for OpenCode AI agent

https://github.com/openchamber/openchamber
2•indigodaddy•30m ago•0 comments

One API for every AI model. Lower costs on autopilot

https://www.deepmyst.com/
1•ahmadassaf•31m ago•0 comments

Show HN: A Postgres Extension to Write PostgreSQL Functions in TypeScript

https://github.com/isaacd9/pg_typescript
1•idd2•31m ago•0 comments

Considering MMAP() verus plain reads for my recent code

https://utcc.utoronto.ca/~cks/space/blog/unix/MmapVsPlainReadThoughts
1•ingve•33m ago•0 comments

MacBook Neo, the Benchmarks

https://birchtree.me/blog/macbook-neo-the-benchmarks/
2•ingve•35m ago•0 comments

What Will It Take to Build the World's Largest Data Center?

https://spectrum.ieee.org/5gw-data-center
2•pseudolus•39m ago•0 comments

Unorthodox Financial Advice

https://liamrosen.com/unorthodox-financial-advice/
1•paulpauper•39m ago•0 comments

ERC-8004 Launch Day was 11 days ago. We shipped a live implementation

https://openpub.ai/blog/erc-8004-launch-day
1•doughardman•40m ago•0 comments

Judge blocks Pentagon effort to 'punish' Anthropic with supply chain risk label

https://www.cnn.com/2026/03/26/business/anthropic-pentagon-injunction-supply-chain-risk
20•prawn•45m ago•0 comments

Trump Says He'll Sign Order to Pay TSA

https://gizmodo.com/trump-says-hell-sign-order-to-pay-tsa-2000738813
3•pseudolus•49m ago•0 comments

The Complete Guide to Deploying Rails 8 with Kamal on Hetzner

https://mooktakim.com/blog/deploying-rails-with-kamal/
2•mooktakim•50m ago•0 comments

I built a tiny CLI that writes my commit messages from Git diff

https://github.com/saccofrancesco/gitsloth
1•s4ccofr4ncesco•52m ago•0 comments

Speaking of Voxtral

https://mistral.ai/news/voxtral-tts
1•claudiug•52m ago•0 comments

Show HN: Drift – Linter for Documentation Rot

https://fiberplane.com/blog/drift-documentation-linter/
1•keturakis•55m ago•0 comments

Every Venue and Every Concert in San Diego 2026

https://www.sdconcerts.app
2•goldkey•57m ago•0 comments