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

Tell HN: EU soliciting feedback on law that could affect Open Access

1•Quanttek•43s ago•0 comments

Connecting portfolios, ATS, AI to simplify startup hiring

1•kathir05•1m ago•0 comments

Clawdbot Personal AI Assistant

https://clawdbot.com/
1•tobi_bsf•2m ago•0 comments

How to Do Great Work

https://paulgraham.com/greatwork.html
1•Anon84•2m ago•0 comments

AI Systems Engineering Patterns

https://blog.alexewerlof.com/p/ai-systems-engineering-patterns
1•weltview•6m ago•0 comments

List of Web Archiving Initiatives

https://en.wikipedia.org/wiki/List_of_web_archiving_initiatives
1•frozenseven•6m ago•0 comments

Either micromanage your people or lean on them

https://betterthanrandom.substack.com/p/either-micromanage-your-people-or
1•weltview•7m ago•0 comments

The Internet Was Built for Humans. Now It's for Agents

https://chiefting.substack.com/p/the-internet-was-built-for-humans
1•mpraz•14m ago•0 comments

Ghost Archive

https://ghostarchive.org/
1•frozenseven•18m ago•0 comments

Paris court finds 10 guilty of cyberbullying France's first lady Brigitte Macron

https://apnews.com/article/brigitte-macron-ruling-cyberbullying-france-5f78de63dc14f765e509a00400...
1•perihelions•18m ago•0 comments

Delta Electronics: Taiwan's Power Supply Giant [video]

https://www.youtube.com/watch?v=nRKxKz2eiOo
1•mgh2•21m ago•0 comments

Who Owns the Memory? Part 1: What Is an Object?

https://lukefleed.xyz/posts/who-owns-the-memory-pt1/
1•lalitmaganti•22m ago•0 comments

Perfect and Imperfect Shuffles

https://www.johndcook.com/blog/2026/01/01/perfect-shuffles/
1•ibobev•22m ago•0 comments

In-Shuffles and Out-Shuffles

https://www.johndcook.com/blog/2026/01/01/in-shuffle-out-shuffle/
1•ibobev•22m ago•0 comments

Freestyle Linked Lists Tricks

https://nullprogram.com/blog/2025/12/31/
1•ibobev•22m ago•0 comments

Ask HN: What kind of side projects are you working on?

2•chistev•24m ago•0 comments

We Come to Know Earth

https://www.quantamagazine.org/how-we-came-to-know-earth-20250915/
1•nsoonhui•24m ago•0 comments

A Woman Who Predicted Tech Fascism – Paulina Borsook Was Right

https://www.youtube.com/watch?v=DL-kwZdkiOA
2•rasengan0•28m ago•0 comments

Show HN: A tiny tool that creates short business snapshots

https://frabjous-sundae-f249f4.netlify.app/
1•RafalPilla•28m ago•0 comments

Everything You Need to Know About Email Encryption in 2026

https://soatok.blog/2026/01/04/everything-you-need-to-know-about-email-encryption-in-2026/
2•tempodox•28m ago•0 comments

8bitDo Reveals Flip-Style iPhone Controller for Portrait Mode Gaming

https://www.macrumors.com/2026/01/05/8bitdo-iphone-controller-portrait-gaming/
1•tosh•29m ago•0 comments

Adolf Hitler: Man of the Year, 1938 (1938)

https://time.com/archive/6598257/adolf-hitler-man-of-the-year-1938/
2•chistev•30m ago•0 comments

The text mode lie: why modern TUIs are a nightmare for accessibility

https://xogium.me/the-text-mode-lie-why-modern-tuis-are-a-nightmare-for-accessibility
1•robin_reala•33m ago•0 comments

Anna's Archive Loses .Org Domain After Surprise Suspension

https://torrentfreak.com/annas-archive-loses-org-domain-after-surprise-suspension/
19•CTOSian•36m ago•1 comments

Visualizing neural network inference in 3D with WebGL and ONNX

https://www.erikjs.com/blog/building-neural-network-visualizer
1•csgod•37m ago•0 comments

The Next Two Years of Software Engineering

https://addyosmani.com/blog/next-two-years/
1•headalgorithm•37m ago•0 comments

John Horton Conway: the most charismatic mathematician (2015)

https://www.theguardian.com/science/2015/jul/23/john-horton-conway-the-most-charismatic-mathemati...
2•thunderbong•38m ago•0 comments

Training MiniMax-M2.1

https://www.minimaxi.com/news/m21-multilingual-and-multi-task-coding-with-strong-general
2•m3h•41m ago•0 comments

I automatically generated minutes for five years of IETF meetings

https://educatedguesswork.org/posts/ietf-minutes/
2•signa11•45m ago•0 comments

Vitalik Says Ethereum Just Solved Crypto's Biggest Problem

https://cryptonews.com/news/vitalik-says-ethereum-just-solved-cryptos-biggest-problem/
3•ogogmad•48m ago•2 comments