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

Mini PC Database

https://awesomeminipc.com/
1•Crier1002•2m ago•0 comments

OpenAI: "We use ... de-identified data to improve ChatGPT"

https://twitter.com/markchen90/status/2097400166554993041
1•nycdatasci•5m ago•1 comments

"What Is an 'AI Warning Shot'?" (2024)

https://gwern.net/blog/2024/sydney
1•simonpure•9m ago•0 comments

Show HN: TUI Markdown reader with beeline support

https://github.com/seymores/mdr
1•seymores•11m ago•0 comments

Better coding agents need more than better models

https://github.com/Wholiver/metis
2•oliverhuchenrui•14m ago•0 comments

Your built-in router VPN might be more trouble than it's worth

https://tailscale.com/blog/built-in-router-nas-vpns
1•soheilpro•17m ago•0 comments

How Poor People Buy Cars

https://abio.substack.com/p/how-poor-people-buy-cars
9•barry-cotter•19m ago•0 comments

Dopamine Sites Sell Nothing, and People Cannot Get Enough

https://www.nytimes.com/2026/09/11/world/asia/dopamine-sites-popularity.html
3•mistersquid•19m ago•0 comments

What Is Bending Spoons?

https://www.s-1.site/s/bending-spoons-a-capital-cycle-play.html
2•anthonybourdain•20m ago•0 comments

ASI existential risk: reconsidering alignment as a goal

https://michaelnotebook.com/xriskbrief/
2•vinhnx•20m ago•0 comments

Why Your Memory API Benchmarks Are Probably Inflated and Misleading

https://chatsorter.com
1•JacobH1234•22m ago•0 comments

Cohere's North Mini Code Megakernel Serving Engine

https://cohere.com/blog/megakernels
2•gmays•28m ago•0 comments

Build Agentic Memory That Keeps Your Loops Alive and Sharpens Them Every Run

https://memanto.ai/blog/agentic-memory-course-keep-loops-alive
1•supportm•31m ago•0 comments

1.1.1.1 now supports post-quantum DNSSEC, all 2,420 bytes of it

https://blog.cloudflare.com/post-quantum-dnssec-1111/
4•vg•33m ago•0 comments

Preview Your Website on iPhone Duo

https://progressier.com/iphone-duo-simulator
1•kbst•34m ago•0 comments

Reduced AI cheating on a long task from 72% to 0 with 190 token agreement prompt

https://www.echohive.ai/grok-integrity-agreement-less-cheating
1•echohive42•34m ago•0 comments

The Last Essay

https://medium.com/human-parts/the-last-essay-e8ad0b0aa921
1•kashnote•37m ago•0 comments

Proof of Well-ordering of Y sequence

https://github.com/Phyrion1343/1Y-Well-Ordering-Lean/tree/main
2•nkochavi•39m ago•1 comments

river-classic - dynamic tiling Wayland compositor with flexible configuration

https://codeberg.org/river/river-classic
1•modinfo•40m ago•0 comments

Mathematicians Confront the AI Apocalypse

https://www.scientificamerican.com/article/mathematicians-confront-the-ai-apocalypse/
3•jonbaer•41m ago•0 comments

Aiope – An on-device AI agent for Android (terminal, browser, SSH, MCP)

https://github.com/XNet-NGO/aiope
3•xnet-admin•45m ago•0 comments

Discovery Loop is raising again, now at $50B valuation

https://www.businessinsider.com/jeff-deans-startup-discovery-loop-is-eyeing-a-valuation-2026-9
2•utiiiD•51m ago•0 comments

Story Beyond the Eye: Glyph Positions Break PDF Text Redaction

https://arxiv.org/abs/2206.02285
1•jumpocelot•52m ago•0 comments

Harness as a Service

https://www.harnessasaservice.dev/
1•iacguy•53m ago•0 comments

Micron's Taiwan workers to get rewards worth up to 68 months of pay

https://www.reuters.com/world/asia-pacific/microns-taiwan-workers-get-rewards-worth-up-68-months-...
4•teleforce•54m ago•0 comments

Dance MIDI Sample Pack Creator

https://monictheory.com/genre/dance/
1•song_synth•57m ago•0 comments

Hip Hop MIDI Sample Pack Creator

https://monictheory.com/genre/hip-hop/
1•song_synth•57m ago•0 comments

Military aircraft reportedly blamed for UK air traffic control outage

https://www.theguardian.com/world/2026/sep/12/military-aircraft-reportedly-blamed-for-uk-air-traf...
1•tmnvix•1h ago•0 comments

Show HN: Fog 2.0: I removed the AI auto-organizing I built my first app around

https://apps.apple.com/us/app/smart-notes-folders-fog/id6760272134
1•akshatsaladi•1h ago•0 comments

Surviving What I Can't Forgive

https://www.thecut.com/article/surviving-without-forgiveness.html
1•littlexsparkee•1h ago•1 comments