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

How North Korea Hid an IT Workforce Inside US Companies [video]

https://www.youtube.com/watch?v=-gjnrMg9iSo
1•stevenjgarner•10m ago•0 comments

AI Withholds Life-or-Death Information Unless You Know the Magic Words

https://substack.com/home/post/p-182524207
1•llamataboot•12m ago•0 comments

Ask HN: At 34, can I aspire to being more than a JavaScript widget engineer?

3•yesitcan•12m ago•0 comments

Is Time Ripe to Throw Your Engineers Under the Trolley

https://medium.com/@farhanhubble/is-time-ripe-to-throw-your-engineers-under-the-trolley-f8d2306d24ae
1•farhanhubble•12m ago•0 comments

Ask HN: Does open-sourcing in B2C usually cripple monetization prospects?

1•schelskedevco•15m ago•0 comments

Ruby 4.0.0 Released

https://www.ruby-lang.org/en/news/2025/12/25/ruby-4-0-0-released/
3•FBISurveillance•18m ago•0 comments

Newtype Index Pattern in Zig

https://matklad.github.io/2025/12/23/zig-newtype-index-pattern.html
1•emschwartz•19m ago•0 comments

The Future of Veritasium

https://www.youtube.com/watch?v=piHGnG4LsmQ
2•rochansinha•19m ago•0 comments

Children's Holiday Letters to Satan

https://www.newyorker.com/humor/daily-shouts/childrens-holiday-letters-satan
2•smurda•21m ago•0 comments

US Software Engineer Compensation Trends: Continued Growth (2024–2025)

https://devnavigator.com/2025/12/24/us-software-engineer-compensation/
3•zuhayeer•26m ago•1 comments

Querying 160 GB of Parquet Files with DuckDB in 15 Minutes

https://datamethods.substack.com/p/querying-160-gb-of-parquet-files
1•zekrom•33m ago•0 comments

The LPU (Language Processing Unit)

https://groq.com/lpu-architecture
1•peter_d_sherman•33m ago•1 comments

The battle to stop clever people betting

https://www.economist.com/christmas-specials/2025/12/18/the-battle-to-stop-clever-people-betting
3•rmason•40m ago•2 comments

The 'Exciting Business Opportunity' That Ruined Our Lives

https://www.theatlantic.com/ideas/archive/2025/01/amway-america/681479/
2•sgerenser•41m ago•0 comments

Trending Terminals

https://itrending.top/terminal/
1•handfuloflight•41m ago•0 comments

Winnie-the-Pooh brings 100 years of fame to forest

https://www.bbc.com/news/articles/c4g9dzj1xj3o
2•1659447091•41m ago•0 comments

The subtle Red of HN and so minimalist and beautiful

2•kinj28•43m ago•1 comments

Oxaide: Sovereign AI knowledge engine for private infrastructure

https://oxaide.com
1•leewenjie•43m ago•0 comments

Load and store forwarding in the Toy Optimizer

https://bernsteinbear.com/blog/toy-load-store/
1•todsacerdoti•47m ago•0 comments

The Future of Fixing Technology (By Denver Gingerich at Fossy 2025) [video]

https://www.youtube.com/watch?v=YiKAlrGM06c
1•pabs3•52m ago•0 comments

The universe may be lopsided

https://theconversation.com/the-universe-may-be-lopsided-new-research-265256
3•aburan28•52m ago•1 comments

Python Applied Mathematics Labs

https://labs.acme.byu.edu/Pages/intro.html
24•vvin•57m ago•1 comments

No Longer Evil – new life for dead/outdated Nest Generation 1 and 2 thermostats

https://nolongerevil.com/
1•pabs3•58m ago•0 comments

Login Issues Impacting Fortnite, Rocket League, Fall Guys

https://status.epicgames.com
2•ryanhn•1h ago•1 comments

Microsoft denies rewriting Windows 11 in Rust using AI

https://www.windowslatest.com/2025/12/24/microsoft-denies-rewriting-windows-11-using-ai-after-an-...
2•zdw•1h ago•0 comments

We Saved Reboot [video]

https://www.youtube.com/watch?v=L00jx-GH2w8
1•jonny_eh•1h ago•0 comments

Understanding AI Benchmarks

https://blog.sshh.io/p/understanding-ai-benchmarks
1•gmays•1h ago•0 comments

.NET R&D Digest (December 2025)

https://olegkarasik.wordpress.com/2025/12/24/net-rd-digest-december-2025/
2•azhenley•1h ago•0 comments

Instacart ends AI pricing tests that increased costs for some shoppers

https://www.cnbc.com/2025/12/22/instacart-ai-pricing-tests-increased-costs.html
1•walterbell•1h ago•0 comments

Supporting Hoperf CMT2300A on Linux

https://rfcorner.in/posts/supporting-cmt2300a-on-linux/
2•logicziller•1h ago•0 comments