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

AI took my job as a translator. I'm starting over at 39 [video]

https://www.youtube.com/watch?v=OovTIngZtCY
1•mmarian•52s ago•0 comments

Ossature can now catch code that compiles but is wrong

https://ossature.dev/blog/code-compiles-but-is-wrong/
1•beshrkayali•1m ago•0 comments

Show HN: Skill Studio – mine, edit, and manage Agent Skills

https://github.com/AltrinaAI/skill-studio
1•harveyhu•2m ago•0 comments

Spotlight on the Shingles Vaccine–Again

https://erictopol.substack.com/p/spotlight-on-the-shingles-vaccineagain
1•paulpauper•3m ago•0 comments

A Maybe Type for C++

https://lzon.ca/posts/tips/cpp-maybe-type/
1•jpmitchell•3m ago•0 comments

The Moonshot

https://writing.antonleicht.me/p/the-moonshot
1•paulpauper•3m ago•0 comments

Dave Baszucki on Roblox, Teen Entrepreneurs, and the Future of Play (Ep. 280)

https://conversationswithtyler.com/episodes/dave-baszucki/
1•paulpauper•4m ago•0 comments

Robust External Hash Aggregation in the Solid State Age (2024)

https://duckdb.org/library/robust-external-hash-aggregation/
1•tosh•5m ago•0 comments

Tons of Loctite adhesive used in Sagrada Familia's central towers

https://www.henkel.com/press-and-media/press-releases-and-kits/2026-06-17-henkel-technology-suppo...
2•melenaboija•5m ago•0 comments

Show HN: Myco Brain – source-traceable memory for AI agents on your own Postgres

https://github.com/thegoodguysla/myco-brain
1•thegoodguys•5m ago•0 comments

Agent for AI Pricing Strategy

https://cloud.limitr.dev/assessment
1•AmeliaWampler•6m ago•0 comments

I told them forced consent was unlawful. 5 years later it cost Elkjop €1.8M

https://www.thatprivacyguy.com/blog/elkjop-forced-consent-fine/
1•speckx•6m ago•0 comments

Robert Mueller (2002): FBI looking to leverage AI to predict 9/11-style attacks

https://www.youtubetrimmer.com/view/?v=1QgQrU4ZMbM&start=1152&end=1196&loop=0
1•BostonFern•7m ago•0 comments

The most important conversational rule most people never learn [video]

https://www.youtube.com/watch?v=XdpnVowlawA
1•gmays•7m ago•0 comments

The AI Hate Progression

https://www.xodium.net/2026/06/the-ai-hate-progression.html
2•gpi•7m ago•0 comments

Show HN: Orchid – An AI Assistant

1•nizzyabi•8m ago•0 comments

DOJ aims to block suit over Musk data center pollution, citing national security

https://www.washingtonpost.com/technology/2026/06/16/justice-department-aims-block-lawsuit-agains...
3•1vuio0pswjnm7•8m ago•0 comments

Choji: Agents to take a customer ask to pull request autonomously

https://twitter.com/chptung/status/2067675275513798730
1•chptung•9m ago•0 comments

GLM-5.2: Benchmarks, Architecture and How to Run It

https://www.techaffiliate.in/blog/glm-5-2-how-to-use-free-benchmarks-review
1•Aditya_kachhawa•11m ago•0 comments

Infrastructure Is the Source of Truth

https://substack.com/@markellens/p-202605003
1•gpi•12m ago•0 comments

Compile Zod (30x faster Zod validation)

https://gajus.com/blog/optimize-zod
1•gajus2•14m ago•0 comments

Wolves outperform dogs in following human social cues

https://www.sciencedirect.com/science/article/abs/pii/S0003347208003631
3•berkeleyjunk•15m ago•0 comments

Show HN: ToNotDo – a tool that helps you know what NOT to do, not a todo app:)

https://tonotdo.cc
1•maz225•17m ago•0 comments

Ask HN: What is the job market like?

8•gardnr•17m ago•1 comments

GAN vs. VAE vs. Diffusion

https://research.rudrite.com/compare/gan-vs-vae-vs-diffusion
1•mridul_sahu•18m ago•0 comments

Show HN: 1pager: Fixing the AI verbosity problem

https://github.com/cfitzgerald-pd/1pager/tree/main
1•bennydog224•18m ago•0 comments

Billionaire tax proposal declared eligible for the November ballot

https://www.latimes.com/california/story/2026-06-17/controversial-billionaire-tax-proposal-appear...
1•1vuio0pswjnm7•18m ago•0 comments

Adding a give_feedback tool to our MCP server

https://www.sanity.io/blog/how-to-get-product-feedback-from-agents
1•kmelve•18m ago•0 comments

Matthias Wandel's web page overflow area

http://matt.wandel.ca
1•OJFord•18m ago•0 comments

Experimental Treatment Kills Prostate Tumor Cells While Increasing Immunity

https://news.weill.cornell.edu/news/2026/06/experimental-treatment-directly-kills-prostate-tumor-...
2•gmays•18m ago•0 comments