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: Forensic stock analysis from SEC filings, no LLM guessing (free)

https://stockonomy.net/proof
1•SEC_Lense•1m ago•0 comments

Show HN: Deskmate Live – AI Desktop Pet Companions

https://deskmatelive.com/
1•valisvalis•2m ago•0 comments

The Nationwide Backlash Against Cameras Watching Your Car

https://www.wsj.com/us-news/the-nationwide-backlash-against-cameras-watching-your-car-401a656a
1•JumpCrisscross•4m ago•0 comments

SpaceX bonds sell off days after AI and rocket group's $25B debt deal

https://www.ft.com/content/04f98e21-4ce7-43d2-8651-44557e12c31c
1•JumpCrisscross•7m ago•0 comments

President warns of 100% tariff on countries implementing digital services tax

https://www.ft.com/content/5d886d47-c509-44a4-9077-bcd25158b61e
2•JumpCrisscross•8m ago•0 comments

AgentKits – 60 production-ready AI agent blueprints with guardrails

https://www.agent-kits.com
1•stoicstoic•8m ago•0 comments

The National Parks Were Reportedly Told to Stay Silent on Deaths

https://www.outsideonline.com/outdoor-adventure/environment/nps-internal-memo-deaths/?link_source...
2•LostMyLogin•8m ago•0 comments

A C++ implementation of a fast hash map and hash set using hopscotch hashing

https://github.com/Tessil/hopscotch-map
2•gjvc•9m ago•0 comments

Evan's Jujutsu Tutorial

https://evmar.github.io/jjtut/
2•joecobb•10m ago•0 comments

A couple of months ago in Miami, I sat down and dumped my brains

https://ghuntley.com/miami/
1•ghuntley•10m ago•0 comments

After 80 Years, Mathematicians Give Famed 'Erdős Method' an Upgrade

https://www.quantamagazine.org/after-80-years-mathematicians-give-famed-erdos-method-an-upgrade-2...
1•ibobev•13m ago•0 comments

Prediction: A Frontier open-source LLM Will Be Released On 3rd December 2026

https://blog.doubleword.ai/frontier-os-llm
2•kkm•13m ago•0 comments

Primed for Malware: Stop Selling Compromised Android Devices

https://www.eff.org/deeplinks/2026/06/primed-malware-stop-selling-compromised-android-devices
2•hn_acker•13m ago•0 comments

We Can Still Stop California's 3D Printer Surveillance Scheme

https://www.eff.org/deeplinks/2026/06/we-can-still-stop-californias-3d-printer-surveillance-scheme
2•hn_acker•14m ago•0 comments

Build real agentic apps using CUGA

https://huggingface.co/blog/ibm-research/cuga-apps
1•gmays•14m ago•0 comments

32bit Apple app running on M4 natively

https://old.reddit.com/r/MacOS/comments/1ufug75/major_breakthrough_32bit_apple_app_running_on_m4/
2•carlosjobim•15m ago•0 comments

Chatbots vs. Ozone

https://blog.dshr.org/2026/05/chatbots-vs-ozone.html
1•anonymous_user9•16m ago•0 comments

Lawmakers Must Act Now to Prevent Armed Police Drones

https://www.eff.org/deeplinks/2026/06/lawmakers-must-act-now-prevent-armed-police-drones
4•hn_acker•16m ago•0 comments

Show HN: I build an app for you to take a break from AI. RainBreak

https://rainbreak.franzai.com/
1•franze•18m ago•0 comments

The internet is all bots now [video]

https://www.youtube.com/watch?v=A9GdcgjRm6A
2•gurjeet•20m ago•0 comments

Ask HN: Which AI concepts are here to stay, and which will churn?

3•datsci_est_2015•20m ago•2 comments

Smartphone could become obsolete within a decade, tech leaders say

https://ktla.com/news/technology/your-smartphone-could-become-obsolete-within-a-decade-tech-leade...
4•Bender•25m ago•3 comments

Linux Foundation and Others Launch Akrites Defend Open-Source from AI Exploits

https://www.phoronix.com/news/Akrites
1•Bender•26m ago•0 comments

Perry – compiles TypeScript to native GUI and CLI apps. No runtime / Electron

https://perryts.com
1•sanketpatrikar•27m ago•0 comments

Apple to Skip High-End M6 Mac Chips, to Launch M7 Pro, M7 Max, M7 Ultra Instead

https://www.bloomberg.com/news/articles/2026-06-25/apple-to-skip-high-end-m6-mac-chips-to-launch-...
2•kristianp•27m ago•1 comments

Coreboot 26.06 Brings Support for 31 New Boards

https://www.phoronix.com/news/Coreboot-26.06-Released
2•Bender•27m ago•0 comments

Secret Service Didn't Secure Mobile Devices

https://thehill.com/homenews/administration/5943032-secret-service-hacking-vulnerability/
1•dieselgate•28m ago•0 comments

Type Inference (Part 1)

https://www.blog.akhil.cc/type-inference-part-1
1•smasher164•29m ago•0 comments

What's holding back the 'white working class' in Grimsby? [video]

https://www.youtube.com/watch?v=K68ryaD_xIE
1•mmarian•30m ago•0 comments

2027 Macs to Get AI-Focused M7 Chips as Apple Skips High-End M6

https://www.macrumors.com/2026/06/25/2027-macs-m7-chips/
1•kristianp•30m ago•0 comments