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

Japan's pension pivot puts Abe-era outpouring of capital in reverse

https://www.reuters.com/world/asia-pacific/takaichis-pension-pivot-seeks-reverse-abe-era-outpouri...
1•tartoran•27s ago•0 comments

The Windows XP Samsung Wii U Gamepad [video]

https://www.youtube.com/watch?v=Rrvrl_Oe5lA
1•josephscott•42s ago•0 comments

Harness Handbook

https://ruhan-wang.github.io/Harness-Handbook/
1•handfuloflight•2m ago•0 comments

Amazon's New Debt Deal Puts Its AI Spending Story on Trial

https://www.marketbeat.com/articles/amazons-new-debt-deal-puts-its-ai-spending-story-on-trial/
1•smn1234•2m ago•0 comments

Burning the 3:40 AM Window

https://www.kevinlondon.com/2026/07/07/burning-the-3-40-am-window/
1•Kaedon•3m ago•0 comments

Engineering technique- Stop Drilling [video]

https://www.youtube.com/shorts/LG-qDttgQUE
1•lifeisstillgood•4m ago•0 comments

Christopher Nolan says younger audiences are utterly rejecting AI-generated slop

https://twitter.com/DiscussingFilm/status/2075611671243194588
2•amrrs•6m ago•1 comments

Why AI Is Collapsing: How China Is Winning [video]

https://www.youtube.com/watch?v=JXJf7vL8k94
1•Bender•8m ago•0 comments

Ask HN: What was the last task where only a frontier model could do it?

5•thedebuglife•10m ago•2 comments

Relax with Coax

https://coaxtheapp.com/
1•ndr42•11m ago•1 comments

Head to Head: Muse Spark 1.1 vs. DeepSeek-V4-Pro

https://runtimewire.com/article/head-to-head-muse-spark-1-1-vs-deepseek-v4-pro
1•ryanmerket•12m ago•0 comments

Filipino virtual assistants behind LinkedIn's "thought leadership" content mill

https://restofworld.org/2026/virtual-assistant-linkedin-engagement/
3•_tk_•14m ago•0 comments

Bluesky Names Toni Schneider CEO

https://bsky.social/about/blog/07-10-2026-toni-schneider-ceo
1•ilreb•15m ago•0 comments

Show HN: Willow Voice – Free AI Dictation

https://willowvoice.com/
1•LiuLawrence45•15m ago•0 comments

How to think about span of control

https://www.rubick.com/span-of-control/
1•sciurus•17m ago•0 comments

Typocalypse – A free online game I made

https://typocalypse.fun/
1•Aurelius101•19m ago•0 comments

War Atlas: An interactive cartography of every named war in human history

https://waratlas.org
2•NaOH•20m ago•0 comments

SpaceX wants to launch 100k more Starlink satellites – for 100x the bandwidth

https://www.zdnet.com/home-and-office/networking/spacex-wants-to-launch-100000-more-starlink-sate...
14•CrankyBear•21m ago•7 comments

Uiua - A tacit array programming language

https://www.uiua.org/
1•weinzierl•22m ago•0 comments

Train the Agent, Then Replace It

https://allthesethings.substack.com/p/train-the-agent-then-replace-it
1•taubek•23m ago•0 comments

"Disk Not Ejected Properly": What It Means

https://bombich.com/blog/2026/07/07/disk-not-ejected-properly
1•speckx•24m ago•0 comments

Generating Effects

https://othermeans.substack.com/p/generating-effects
1•Tomte•24m ago•0 comments

Bun vs. Deno vs. Node.js 2026: Real Benchmarks Mislead

https://byteiota.com/bun-vs-deno-vs-node-js-2026-real-benchmarks-mislead/
3•h1696UOuk•25m ago•0 comments

The Work of Helping A.I. Destroy Work

https://www.nytimes.com/2026/07/10/business/ai-white-collar-jobs.html
1•apparent•25m ago•0 comments

The 2025–2026 Evolution of Generative Spatial AI

https://hal9.com/articles/the-2025-2026-evolution-of-generative-spatial-ai
1•javierluraschi•25m ago•0 comments

Alarm over launch of facial recognition in UK shops that instantly alerts police

https://www.theguardian.com/technology/2026/jul/10/facewatch-facial-recognition-uk-shops-instantl...
3•pseudolus•27m ago•0 comments

Why Stone-Faced Fascists Keep Getting Antiquity Wrong

https://www.thebulwark.com/p/why-stone-faced-fascists-keep-getting-antiquity-wrong-x-twitter-elon...
3•Tomte•29m ago•0 comments

Property Graphs in PostgreSQL

https://www.postgresql.org/docs/19/ddl-property-graphs.html
1•throwaway7783•30m ago•0 comments

Boom Prize: $750k to the first amateur RC plane that breaks the sound barrier

https://boomsupersonic.com/prize
2•dwwoelfel•30m ago•1 comments

Disable autoplay and infinite scroll or risk fines, EU tells Meta

https://arstechnica.com/tech-policy/2026/07/disable-auto-play-and-infinite-scroll-or-risk-massive...
3•OptionOfT•32m ago•0 comments