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

New TONTOU CPU attack bypasses Spectre v2 fixes, leaks Linux password hashes

https://www.bleepingcomputer.com/news/security/new-tontou-cpu-attack-bypasses-spectre-v2-fixes-le...
1•sbulaev•2m ago•0 comments

Airlines Push Back Against ICE Enforcement at Airports

https://www.wsj.com/business/airlines/airlines-push-back-against-ice-enforcement-at-airports-50a4...
1•petethomas•3m ago•0 comments

Someone Stole $15,000 And Nobody Cared

https://michelesteelenow.substack.com/p/the-mahomes-heist-you-dont-know-about
1•jawns•3m ago•0 comments

Show HN: Compare frontier speech-to-speech models for free

https://voiceduel.com/
2•armaanp23•4m ago•0 comments

Prompt Injection Vulnerability in Ollama, Gemma4 and HuggingFace's Transformers

https://www.reddit.com/r/LocalLLaMA/comments/1vhivsb/prompt_injection_in_ollama_gemma4_and/
1•pavelai•6m ago•1 comments

The Challenger Launch Decision

https://press.uchicago.edu/ucp/books/book/chicago/C/bo22781921.html
2•gregsadetsky•7m ago•1 comments

Intuitize – The Thoughtful AI

https://intuitize.pages.dev/
1•telui•8m ago•0 comments

California Man Is Kidnapped Then Executed in Front of Police

https://www.nytimes.com/2026/07/31/us/kidnapping-shooting-chino-hills.html
3•Michelangelo11•9m ago•0 comments

The energy use of agentic AI

https://www.theclimatebrink.com/p/the-real-energy-use-of-agentic-ai
1•alphabetatango•10m ago•0 comments

An Agentic IDE That Builds Itself

https://www.sawyerhood.com/blog/an-agentic-ide-that-builds-itself
5•sawyerjhood•10m ago•0 comments

Attacks your login screen should be terrified of

https://fusionauth.io/lp/10-attacks-mfa
1•mooreds•11m ago•0 comments

The Pentagram Map

https://e-infinity.space/pentagram-map/
1•mathgenius•11m ago•0 comments

Social Media AI Agent That Works over WhatsApp

https://www.youtube.com/watch?v=J9TJciv_hxc
1•jflynn2•13m ago•1 comments

0-day security update available for Metabase

https://www.metabase.com/blog/security-update
2•garyhtou•13m ago•0 comments

Show HN: GreatArrow.ai – Shared memory for Claude, ChatGPT, Gemini and Cursor

https://www.greatarrow.ai
1•clapptastic•14m ago•0 comments

From Memory to Agency

https://arkalabs.app/from-memory-to-agency
1•Jergrim•16m ago•0 comments

Google repository now has 90 skills

https://github.com/google/skills
2•haebom•17m ago•0 comments

Everyday Technology Is Becoming a Black Box. Is There a Cost?

https://thereader.mitpress.mit.edu/everyday-technology-is-becoming-a-black-box-is-there-a-cost/
1•EA-3167•17m ago•0 comments

Gemma Translator: offline DIY translation device built with Gemma 4

https://www.youtube.com/watch?v=4dNry5zP0Jo
1•twobitshifter•17m ago•0 comments

Slopaganda Countermeasures: Part 1

https://docsgoblin.com/blog/26-03-17-slopaganda-countermeasures.html
1•erikhopf•18m ago•0 comments

Spin audit of SQD/QSCI quantum-chemistry benchmarks on iron–sulfur clusters

https://zenodo.org/records/21359923
3•purestatelabs•19m ago•0 comments

Kevin Warsh to stick with lean Fed messaging despite market backlash

https://www.ft.com/content/debe096f-ec89-424f-a8ca-d3843ef53549
1•petethomas•21m ago•0 comments

"I loved every minute of it, however hard it had been" [video]

https://www.youtube.com/watch?v=GS7CxAtV5Ks
2•jackdoe•28m ago•1 comments

OpenAI's ring-shaped smart speaker will reportedly cost between $300 and $400

https://www.engadget.com/2232108/openai-s-ring-shaped-smart-speaker-will-reportedly-cost-between-...
4•prng2021•30m ago•3 comments

Patient Zero (you can hug faces with cyber arms)

https://lokley.substack.com/p/patient-zero
1•loopscrollgame•31m ago•0 comments

The Schwarzschild Metric: Complete Derivation – General Relativity [video]

https://www.youtube.com/watch?v=6cSYZMM0wU4
1•binyu•34m ago•0 comments

VCS Friendly Scene Diffs in Godot 4.8

https://godotengine.org/article/dev-snapshot-godot-4-8-dev-2/#core-write-object-variants-with-n-b...
1•BinRoo•35m ago•0 comments

Snapline – menu-bar screenshot app that searches shots by their text

https://snap-line.app/
2•ziadeh•35m ago•0 comments

Blasting the Air in Front of Hypersonic Vehicles with Lasers Reduces Drag

https://www.twz.com/33859/blasting-the-air-in-front-of-hypersonic-vehicles-with-lasers-could-unlo...
3•delichon•41m ago•1 comments

How I released a game that has no assets [video]

https://www.youtube.com/watch?v=Qr3VsZYQy4s
1•EspadaV9•43m ago•1 comments