frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

3•polishdude20•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

Elon Musk at Montana Jobs Summit (2013) [video]

https://www.youtube.com/watch?v=fWCCcgVwNJ0
1•nomilk•55s ago•0 comments

Show HN: Memory System for Claude Code and Other CLIs

https://github.com/RLabs-Inc/memory
1•RustyNail96•2m ago•1 comments

Russia blocks Snapchat, along with Roblox and FaceTime

https://meduza.io/en/news/2025/12/04/russia-blocks-snapchat-along-with-roblox-and-facetime
1•cnr•5m ago•0 comments

Show HN: We've Built First AI Agent for Mobile Apps

https://kuralit.com/
1•_karthikeyans_•6m ago•0 comments

Residential IP RDP – Real ISP Home Network Access – Rdpextra

1•EVAN1098•9m ago•0 comments

Have Top Chinese AI Researchers Stayed in the United States?

https://carnegieendowment.org/emissary/2025/12/china-ai-researchers-us-talent-pool?lang=en
1•hunglee2•9m ago•0 comments

Show HN: Meeting notes and transcripts straight into Obsidian

https://obsidian.md/plugins?search=granola
2•tomelliot•10m ago•0 comments

TinyLife6502. GOL in 114 Bytes

https://www.lemon64.com/forum/viewtopic.php?t=88104
1•orac81•10m ago•1 comments

Original PoCs for React2Shell CVE-2025-55182

https://github.com/lachlan2k/React2Shell-CVE-2025-55182-original-poc
1•dbushell•13m ago•0 comments

Show HN: Atlas4D – Open-source 4D spatiotemporal platform on PostgreSQL

https://github.com/crisbez/atlas4d-base
1•atlas4d•14m ago•0 comments

Show HN: TaskWand – Generate n8n workflows using RAG on 2k+ real examples

https://taskwand.io/
1•ronanren•15m ago•0 comments

Vibe code like it's 1986

https://vibecommander.dev
1•fatliverfreddy•17m ago•0 comments

SedaiBasic2: A fast BASIC interpreter with a pure register-based VM

https://github.com/camauri/SedaiBasic2
1•camauri•19m ago•1 comments

Japanese Game co. asks applicants to draw in person to avoid generative AI fraud

https://automaton-media.com/en/news/mid-size-game-company-in-japan-asks-potential-recruits-to-dra...
1•Geekette•19m ago•0 comments

A new jailbreak has been released for iOS 17.0 and 16.7 RC (20H18)

https://old.reddit.com/r/jailbreak/comments/1pej2jq/a_new_jailbreak_has_been_released_for_ios_170...
1•remark5396•22m ago•1 comments

My mom doesn't like cat videos anymore

4•FrankyHollywood•22m ago•1 comments

Lisp Style and Design

https://archive.org/details/miller-and-benson-1990-lisp-style-design
1•todsacerdoti•25m ago•0 comments

The Return of Procedural Programming [video]

https://www.youtube.com/watch?v=vQPHtAxOZZw
2•tosh•25m ago•0 comments

The Road to Zig 1.0 (2019) [video]

https://www.youtube.com/watch?v=Gv2I7qTux7g
1•tosh•26m ago•0 comments

Why Does A.I. Write Like That?

https://www.nytimes.com/2025/12/03/magazine/chatbot-writing-style.html
1•laurenzse•28m ago•0 comments

Shredded Cheese Journalism

https://dkdc.dev/posts/shredded-cheese-journalism/
1•dkdcio•30m ago•0 comments

Unredacted Magazine Issue 008 SEP 2025 [pdf]

https://unredactedmagazine.com/issues/008.pdf
1•signa11•31m ago•0 comments

Why We Can't Quit Excel

https://www.bloomberg.com/features/2025-microsoft-excel-ai-software/
7•thm•32m ago•1 comments

Trump reveals what he wants for the world

https://www.politico.com/news/2025/12/05/trump-reveals-national-security-strategy-western-hemisph...
1•breppp•34m ago•0 comments

Show HN: TypeScript runtime that syncs state for your multiplayer app/game

https://martini-kit.com/
1•yaoke259•35m ago•0 comments

Go's escape analysis and why my function return worked

https://bonniesimon.in/blog/go-escape-analysis
1•bonniesimon•35m ago•0 comments

Rebuilding our documentation site using AI

https://endor.dev/blog/rebuilding-our-docs
1•angelmm•38m ago•0 comments

Framework Design Guidelines

https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/framework-design-guidelines-di...
1•jpeter•39m ago•0 comments

Sending 'real' telegrams with Telegram

https://github.com/rscircus/the-telegram-telegram
1•rawland•40m ago•0 comments

American Data Centers

https://tech.marksblogg.com/american-data-centers.html
1•marklit•40m ago•0 comments