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

Arcan: A Farewell to Hubs

https://arcan-fe.com/2026/10/23/a-farewell-to-hubs/
1•ingenieroariel•1m ago•1 comments

OpenAI slashes funding target by $10B as tech anxieties mount

https://www.ft.com/content/7a3ad950-1b3b-4d9e-8c15-65a61ae6180f
2•zomtorg•9m ago•0 comments

Show HN: Blc – scheduled website blocker for macOS

https://github.com/BohdanPetryshyn/blc
1•BohdanPetryshyn•11m ago•0 comments

Welcome to GenZ University

https://genzuniversity.in/
1•jruohonen•13m ago•0 comments

Show HN: Governor, a firewall for AI agent spend and tool calls

https://bsvkey-governor-demo.fly.dev/
1•PDRGenerator•15m ago•0 comments

Travellar – the trips in your camera roll, as animated map videos

https://www.travellar.app/
2•gbresciano•24m ago•0 comments

Site Reliability Engineering (2nd Edition)

https://www.oreilly.com/library/view/site-reliability-engineering/9798341607675/
1•teleforce•24m ago•0 comments

System Zero

https://www.rightnowai.co/
1•OsamaJaber•27m ago•0 comments

Bee Cleansing Flight (What's It All About?)

https://beekeepinginsider.com/bee-cleansing-flight/
1•thunderbong•30m ago•0 comments

Black October: At least nine AI developer platforms breached this month

https://www.wiz.io/blog/black-october-for-ai-developer-platforms
2•acossta•31m ago•0 comments

Where AI agents' social boundaries break: 5 LLMs try to form a government

https://judgementlabs.app/blog/the-coalition-room
1•Jash271•36m ago•2 comments

Ask HN: What's the future like? For normies, will it still be apps and websites?

1•talmr•39m ago•0 comments

Behind the Scenes of Crypto's Biggest Nightmare: A Record-Breaking Cyber Heist

https://www.wsj.com/finance/currencies/behind-the-scenes-of-cryptos-biggest-nightmare-a-record-br...
1•jaredwiener•43m ago•1 comments

JWST reveals a distant galaxy that may let most of its ionizing radiation escape

https://phys.org/news/2026-10-jwst-reveals-distant-galaxy-ionizing.html
1•wglb•43m ago•1 comments

General Atomics Developing Flying Wing That Uses Hybrid-Electric Propulsion

https://www.twz.com/news-features/general-atomics-developing-strike-recon-flying-wing-called-next...
1•cisc•50m ago•0 comments

Show HN: To Honor Sir Patrick Stewart, Enjoy the TNG Episode Guessing Game

https://tng.episodle.com/
17•francisofascii•51m ago•5 comments

Live CVE Feed to Keep Your Agent Up to Speed

https://casco.com/cve
1•french_toast_fi•53m ago•0 comments

Googling Firebase got me a phishing page hosted by Google

https://volodymyr.smirnov.im/writing/google-firebase-phishing/
4•vsmim•53m ago•0 comments

Be a Loser

https://makemeacto.cc/be-a-loser/
1•larsfaye•54m ago•0 comments

China's CE-25A Electric Commuter Airliner Demonstrator Emerges

https://www.twz.com/air/chinas-ce-25a-electric-commuter-airliner-demonstrator-emerges-in-photos
2•cisc•59m ago•0 comments

Channel Binding

https://blog.prosody.im/channel-binding/
1•zaik•1h ago•0 comments

AI agents shape experts' judgment calls

https://www.anthropic.com/research/agents-judgment-calls
1•firasd•1h ago•1 comments

Hue-rs: control hue lightbulb directly

https://github.com/hiatus770/hue-rs
1•hiatus330•1h ago•0 comments

U.S. approves $2.1B sale of Patriot interceptors to Ukraine

https://www.nbcnews.com/world/ukraine/us-approves-21-billion-sale-patriot-interceptors-ukraine-rc...
3•paaloeye•1h ago•1 comments

Fair Use Benefits Everyone

https://openai.com/index/fair-use-benefits-everyone/
19•pentagrama•1h ago•43 comments

The 'Moylan Arrow' Is One of Ford's Best Contributions to Car Design

https://www.thedrive.com/news/the-moylan-arrow-is-one-of-fords-best-contributions-to-car-design
4•thunderbong•1h ago•0 comments

10.0: CVE-2026-112816 – Canonical LXD – Improper cert validation — no emudhra

https://twitter.com/cvedotnow/status/2116213963872518418
1•paaloeye•1h ago•0 comments

Ask HN: Are most of you using HN Replies? Or what else do you use?

3•Gooblebrai•1h ago•4 comments

Show HN: Free Unlimited Virtual Monitors+Watch Claude Work on Them+Community

https://multispace.dev/
1•DanielSystem•1h ago•12 comments

Federal Bureau of Prisons employees serve as election monitors at polling sites

https://www.corrections1.com/federal-prison/bop-employees-to-serve-as-election-monitors-at-pollin...
12•MadrasTh0rn•1h ago•2 comments