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

Show HN: Numbword – a daily word game where letters add up to a target

https://numbword.com/
1•celltalk•1m ago•0 comments

30-Second Cherry Trick Sleep Formula Explained

https://gamma.app/embed/30-Second-Cherry-Trick-For-Sleep-Yu-Sleep-Review-2026-tsv4bcfbd4syqwf?mod...
1•prepostseo•1m ago•0 comments

Check any website up/down Status?

https://urlwatch.io/
1•rajkverma123•4m ago•0 comments

The mathematical secrets of Barcelona's Sagrada Familia

https://mappingignorance.org/2026/06/30/sagrada-familia/
1•Gedxx•7m ago•0 comments

EU Parliament temporarily defies Chat Control

https://www.heise.de/en/news/Partial-victory-with-a-catch-EU-Parliament-temporarily-defies-chat-c...
2•donpott•7m ago•0 comments

SmrtLnks – Cheaper Bitly link shortener that routes by GEO, dynamic QR included

https://smrtlink.link/
1•ExcellentNobody•8m ago•0 comments

India asks WhatsApp to pause username feature rollout over fraud concerns

https://www.bbc.com/news/articles/ckg8e0n9l41o
1•Markoff•10m ago•0 comments

JPEG-XL Libjxl 0.12 Brings More Performance Optimizations

https://www.phoronix.com/news/JPEG-XL-libjxl-0.12
2•blurred•12m ago•0 comments

Multiple Linux tarballs return 404 on kernel.org

https://kernel.org/
1•Lwrless•18m ago•0 comments

Alibaba to ban Claude Code in workplace over alleged backdoor risks, source says

https://www.reuters.com/world/china/alibaba-ban-claude-code-workplace-over-alleged-backdoor-risks...
5•nsoonhui•18m ago•1 comments

Half-Baked Product

https://weli.dev/blog/half-baked-product/
2•weli•26m ago•1 comments

How eveRy webSite is tRacking you 24/7. SiTe STaMpS

https://medium.com/@thesuperrepemail/how-every-website-is-tracking-you-24-7-site-stamps-333e8026eaba
1•mssblogs•27m ago•0 comments

Giotto.ai: "A Swiss lab with European heart"

https://www.giotto.ai/#about
1•theanonymousone•27m ago•0 comments

ECTC 2026 Roundup, Intel, TSMC, SK Hynix, Samsung, Micron, Marvell, Lightmatter

https://newsletter.semianalysis.com/p/ectc2026
1•felixdoerp•29m ago•0 comments

Nobody Reads the SQL Anymore

https://tabularis.dev/blog/nobody-reads-the-sql-anymore
1•debba•29m ago•1 comments

'guix substitute' and 'guix pull' Vulnerabilities

https://guix.gnu.org/en/blog/2026/guix-substitute-pull-vulnerabilities/
1•elephant-ocean•29m ago•0 comments

I replaced my GitHub runners with Lambda MicroVMs, and maybe you should too

https://lucvandonkersgoed.com/2026/07/01/i-replaced-my-github-runners-with-lambda-microvms-and-ma...
1•touristtam•31m ago•1 comments

NVCF: Deploy and Route GPU-Accelerated AI Workloads at Scale

https://github.com/NVIDIA/nvcf
1•mastabadtomm•32m ago•0 comments

Amazon's Mechanical Turk to stop accepting new customers

https://www.theregister.com/off-prem/2026/07/03/amazons-mechanical-turk-to-stop-accepting-new-cus...
7•50kIters•37m ago•0 comments

Action Preflight: consequence-aware admission for LLM agent actions

https://github.com/gfernandf/agent-skills/blob/main/docs/ACTION_PREFLIGHT_FORECAST_QUICKSTART.md
1•gfernandf1•38m ago•2 comments

Exploring Nix for Enterprise Teams

https://medium.com/ekino-france/exploring-nix-for-enterprise-teams-2e61d755e473
1•tduyng•39m ago•0 comments

Global gridded population datasets underrepresent rural population (2025)

https://www.nature.com/articles/s41467-025-56906-7
2•bryanrasmussen•44m ago•1 comments

The Law of Leaky Abstractions (2002)

https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/
1•SmartHypercube•45m ago•0 comments

What Happened to the Fight for the Internet?

https://dustycloud.org/blog/what-happened-to-the-fight-for-the-internet/
1•birdculture•46m ago•1 comments

Show HN: TTS Model – Another attempt to cross the uncanny valley

https://theclevr.com
1•cyrus_ck•51m ago•0 comments

We sell digital assets built on AI-powered business models

https://digitvest.com/en
1•kilincarslan•51m ago•0 comments

Naval: Code is consumed by computers, writing by humans. So write it yourself

https://www.ssp.sh/brain/the-differences-between-writing-and-coding/
2•zazuke•54m ago•0 comments

Editorial: It's time to step up and have your say for science

https://arstechnica.com/science/2026/07/editorial-the-most-important-thing-you-can-do-to-protect-...
2•rbanffy•54m ago•1 comments

Argo Mission 1

https://www.argospace.com//news/argo-mission-1
1•da-x•55m ago•0 comments

'Vanishingly rare' copy of US Declaration of Independence found in UK archives

https://www.theguardian.com/uk-news/2026/jul/03/vanishingly-rare-copy-us-declaration-independence...
2•6LLvveMx2koXfwn•56m ago•0 comments