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

August in Servo: CSS Grid, text selection, and more

https://servo.org/blog/2026/10/09/august-in-servo/
1•msub2•2m ago•0 comments

Woodworking Tools and Knowledge Tools

https://peterkaminski.ai/writing/woodworking/
1•cyb0rg0•3m ago•1 comments

OpenAI Saudi national bugging case shows threat to U.S. leadership in AI

https://www.cnbc.com/2026/10/16/ai-espionage-openai-jay-clayton.html
1•snarky-comments•3m ago•0 comments

A 1987 Shellsort variant is 3x faster than Shellsort when branch-free

https://github.com/utahisnotastate/utah_sort
1•utahisnotastate•8m ago•0 comments

Ninth Circuit Holds Copilot Creates New Code, Not Stripped Copies

https://www.fenwick.com/insights/publications/nothing-remove-ninth-circuit-holds-copilot-creates-...
2•ollien•11m ago•0 comments

Anthropic reports reducing recruitment of entry-level engineers

https://angadh.com/ai-and-jobs-1
1•angadh•12m ago•1 comments

BugShield Scout: 1,415 WordPress theme vulnerabilities

https://bugshield.co.uk/blog/wordpress-theme-vulnerabilities-bugshield-scout
1•wondersky•13m ago•0 comments

Mini organs launching to space may help future astronauts stay healthy

https://abcnews.com/Health/mini-organs-launching-space-future-astronauts-humans-earth/story?id=13...
1•gmays•18m ago•0 comments

Show HN: Moonrain – a free, offline sleep-sound mixer for iOS with no tracking

https://apps.apple.com/us/app/moonrain-sleep-sounds/id6789770084
1•gsl0001•22m ago•0 comments

Perhaps the most underappreciated engineer of the Industrial Revolution

https://twitter.com/andrewmccalip/status/2110977221347475675
2•delichon•32m ago•0 comments

Changing the Ratio

https://crackedegg.press/posts/changing-the-ratio/
1•CqtGLRGcukpy•34m ago•0 comments

Show HN: Cosplay as a tech lead, using gVisor to sandbox agents

https://github.com/SoftwareRenderer/MIKE
1•SftwareRenderer•34m ago•0 comments

Show HN: Env-tabs – Pin your projects in Claude Desktop's Code tab

https://github.com/ahmtsahin/claude-env-tabs
1•impala64•40m ago•0 comments

Citizen Science Groups Grapple with the Rise of A.I. Slop

https://www.nytimes.com/2026/10/16/science/citizen-science-ai-slop.html
1•lxm•40m ago•0 comments

Feel Like You're Overpaying for Hotels? Blame Expedia, a New Lawsuit Says

https://www.nytimes.com/2026/10/16/travel/expedia-lawsuit-hotel-prices.html
3•lxm•40m ago•1 comments

Control the Ideas, Not the Code

https://www.antirez.com/news/169
1•devtor•42m ago•1 comments

Dogs Seem to Agree with Humans That 'Bouba' Is Round and 'Kiki' Is Spiky

https://www.sciencealert.com/dogs-seem-to-agree-with-humans-that-bouba-is-round-and-kiki-is-spiky
3•gmays•46m ago•0 comments

What will AI do to our jobs and our wages? [video]

https://www.youtube.com/watch?v=kAkpzlR7io8
1•Wilsoniumite•54m ago•0 comments

Just Dashboard – Self Hosted. Deploy Apps / Databases. A Dashboardfor Everything

https://github.com/JustDashboard/Just-Dashboard
1•Wayy01•55m ago•0 comments

MariaDB Fork

https://mariadb.com/docs/server/reference/sql-statements/data-definition/alter/alter-server
1•lufxen•1h ago•1 comments

Bookfolio: Free Books for Learning and Joyful Reading

https://bookfolio.io/browse/free
1•zenull•1h ago•0 comments

Constructing Languages

https://frozenfractal.com/blog/2024/8/9/around-the-world-19-constructing-languages/
1•andsoitis•1h ago•0 comments

Zuckerberg's Meta Takes Down No Kings Instagram During Protest Day

https://meidasnews.com/news/zuckerbergs-meta-takes-down-no-kings-instagram-during-massive-protest...
219•DeepLogin•1h ago•102 comments

Major New Features in ES2027

https://front-end.tips/es2027-javascript-features/
3•khalidkhair•1h ago•0 comments

Russian Bot Activity Collapses by 84% After Strikes on Yandex Data Centers

https://cpd.gov.ua/en/report/analytical-report-when-bots-go-silent-what-the-strikes-on-yandex-dat...
7•DeepLogin•1h ago•0 comments

KrypticKode007 – Embodied Cybernetic Sentience Core Engine

https://github.com/KrypticKode007/kryptic-agent
1•KrypticKode007•1h ago•0 comments

What 500 MiniMax Code Tests Revealed About AI Saying "Done"

https://defuzex.ai/blog/what-500-minimax-code-tests-revealed-about-ai-saying-done
3•SongWang•1h ago•0 comments

Adventures in Real-Time MIDI

https://www.perl.com/article/adventures-in-real-time-midi/
1•oalders•1h ago•0 comments

Drunken Goddess Reflux Public Demo Canceled over AI Imitation Concerns

https://noisypixel.net/drunken-goddess-reflux-public-demo-canceled-ai-imitation-concerns/
1•mister_mort•1h ago•2 comments

Dudu, back up and restore your dev setup on macOS and Linux with one command

https://github.com/fontnelle/dudu
1•fontnelle•1h ago•0 comments