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

What Is Authorship When Machines Can Write?

https://thereader.mitpress.mit.edu/what-is-authorship-when-machines-can-write/
1•pseudolus•3m ago•0 comments

Louisiana congressional primaries suspended after Supreme Court ruling

https://www.pbs.org/newshour/politics/louisiana-congressional-primaries-suspended-after-supreme-c...
2•Bender•4m ago•0 comments

Autonomous payments between Agents using L402? [video]

https://www.youtube.com/watch?v=33KZQJS1-Vw
1•gabrielpmares•6m ago•1 comments

Is a Sovereign Single‑File Node OS (Uni‑B) a Viable Architecture?

https://planned-tan-ktnij0otlq.edgeone.app/
1•UnrealizedTech•7m ago•0 comments

Beijing bans drone sales even as rest of world buys Chinese drones

https://arstechnica.com/gadgets/2026/04/beijing-bans-drone-sales-even-as-rest-of-world-buys-chine...
1•Mindless2112•10m ago•0 comments

German energy tech startup becomes Europe's latest unicorn following €50M raise

https://impactloop.com/article/cmblu-becomes-europe-s-latest-energy-tech-unicorn-following-50m-ra...
1•doener•11m ago•0 comments

Mini Shai-Hulud in Intercom Package Spreads to Packagist Using Composer Plugin

https://semgrep.dev/blog/2026/malicious-intercom-php-package-spreads-mini-shai-hulud-attack-to-pa...
1•j12y•11m ago•0 comments

Ask HN: Any dashboards give realtime average AI chatbot response time?

1•MrCoffee7•15m ago•0 comments

Utah's New Law Targeting VPNs Goes into Effect Next Week

https://www.eff.org/deeplinks/2026/04/utahs-new-law-regulating-vpns-goes-effect-next-week
4•iamnothere•17m ago•1 comments

Simple and Correct Snapshot Isolation

https://remy.wang/blog/si.html
1•remywang•19m ago•0 comments

LLM Quantization

https://huggingface.co/docs/transformers/main_classes/quantization
1•Anon84•19m ago•0 comments

Finding Zero Days with any model?

https://www.provos.org/p/finding-zero-days-with-any-model/
1•dnw•25m ago•0 comments

Show HN: Gemini free tier is all you need

https://juanpabloaj.com/2026/04/30/gemini-free-tier-is-all-you-need/
1•juanpabloaj•29m ago•0 comments

We scanned 100 Smithery MCP servers, 22 flagged, here's what we found

3•chaksaray•30m ago•2 comments

The tortoise and the hare live on

https://unsung.aresluna.org/the-tortoise-and-the-hare-live-on/
2•CharlesW•31m ago•0 comments

U.S. gender ratios by metro, ages 20-34

https://getdatingphotos.com/gender-ratios
1•nsokolsky•32m ago•1 comments

US cyber team hasn't been activated yet to protect midterm elections

https://www.cnn.com/2026/04/30/politics/cyber-team-midterm-elections-foreign-meddling
2•dabinat•34m ago•0 comments

Morphing UI with Motion (and why most implementations feel wrong)

https://raminmousavi.dev/blog/animation-morphing-with-motion
1•ramin2nt2•35m ago•0 comments

Bash Is Not Enough: Why Large-Scale CI Needs an Orchestrator

https://www.iankduncan.com/engineering/2026-02-06-bash-is-not-enough/
1•birdculture•35m ago•0 comments

Chinese Courts Rule Companies Cannot Fire Workers Simply to Replace Them with AI

https://www.caixinglobal.com/2026-04-30/chinese-courts-rule-companies-cannot-fire-workers-simply-...
3•yesbut•37m ago•0 comments

Show HN: Fauxcquired Podcast about Eli Lilly

https://open.spotify.com/episode/2jQhCJBOVMXrfpSoC1c9ou
1•nbaronia•38m ago•0 comments

Mvm

https://marc.vertes.org/announcing-mvm/
1•mvertes•38m ago•0 comments

JuliaHub Raises $65M Series B

https://juliahub.com/blog/juliahub-raises-65m-series-b-launches-dyad-3.0
2•postflopclarity•39m ago•0 comments

"Security problems are just bugs" (2017)

https://lkml.org/lkml/2017/11/17/767
1•guiambros•40m ago•1 comments

Good news for New Mexico. Meta withdrawal on the horizon

https://www.engadget.com/2161607/meta-says-it-may-withdraw-its-apps-from-new-mexico-if-judge-agre...
4•wilburx3•41m ago•1 comments

Flakes, the Best Practices of Vibe DevOps

https://blog.fernvenue.com/archives/flakes-as-art/
1•fernvenue•41m ago•0 comments

Public Libraries Scrap Late Fines to Alleviate Inequity (2019)

https://www.kuow.org/stories/we-wanted-our-patrons-back-public-libraries-scrap-late-fines-to-alle...
1•thunderbong•42m ago•0 comments

The Spectrum of Agentic Coding [video]

https://vimeo.com/1187957189
1•ykdojo•43m ago•0 comments

Show HN: Booksearch – fast TUI search for book collections

https://github.com/rahimnathwani/booksearch
1•rahimnathwani•46m ago•0 comments

Apple Q2 2026 earnings report

https://www.cnbc.com/2026/04/30/apple-aapl-q2-2026-earnings-report.html
2•kristianp•48m ago•0 comments