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

Show HN: Flux, A Python-like language in Rust to solve ML orchestration overhead

https://github.com/cmc-labo/flux
1•hpscript•1m ago•0 comments

Python's `json.tool` Utility

https://docs.python.org/3/library/json.html
1•dvrp•8m ago•0 comments

AI agent generates rebuttals for papers

https://arxiv.org/abs/2601.14171
1•meander_water•9m ago•0 comments

Claude Code TeamateTool (binary analysis)

https://gist.github.com/kieranklaassen/d2b35569be2c7f1412c64861a219d51f
1•dnw•15m ago•0 comments

Shelley: A Coding Agent

https://github.com/boldsoftware/shelley
1•luu•23m ago•0 comments

Visualizing K-Way Merge: An Interactive Guide to Database Sorting

http://justinhj.github.io/2026/01/19/visualizing-k-way-merge.html
1•todsacerdoti•25m ago•0 comments

Ask HN: Why is the Lua web / related ecosystem so stagnant?

1•jmspring•30m ago•0 comments

AMI Labs: Real World. Real Intelligence

https://amilabs.xyz/
1•pilingual•32m ago•0 comments

Major crypto theft discovered by Zach XBT

https://twitter.com/zachxbt/status/2014685263327351116
1•paulpauper•32m ago•0 comments

Show HN: Cholesterol Tracker – Built after high cholesterol diagnosis at 33

https://cholesterol-tracker.poniansoft.com/
1•briskibe•41m ago•0 comments

Joy and Curiosity #70

https://registerspill.thorstenball.com/p/joy-and-curiosity-70-d85
1•kristianp•42m ago•0 comments

Ask HN: In the era of AI, which language would you choose?

1•tcper•43m ago•0 comments

The Internet Doesn't Suck: Blame Big Tech, Not the Internet

https://riverseeber.net/blog/post/the-internet-doesnt-suck/
2•cratermoon•44m ago•0 comments

GNU Guix 1.5.0 released with new support for RISC-V 64-bit architecture

https://guix.gnu.org/blog/2026/gnu-guix-1.5.0-released/.
1•teleforce•45m ago•0 comments

1961 Goldsboro B-52 crash

https://en.wikipedia.org/wiki/1961_Goldsboro_B-52_crash
2•st_goliath•45m ago•0 comments

U.S. workers just took home their smallest share of capital since 1947

https://fortune.com/2026/01/13/us-workers-smallest-labor-share-gdp-on-record/
4•_DeadFred_•46m ago•2 comments

Ask HN: iPhone 15 pro handset just damaged my hearing, what now?

9•joecool1029•46m ago•2 comments

Remarkable sodium-ion battery has a lignin heart of 'wood'

https://newatlas.com/energy/sodium-ion-battery-lignin/
1•westurner•48m ago•2 comments

The Problem of Flatness in Ancient Egypt

https://www.youtube.com/watch?v=vhv8fAqN1cw
3•bane•50m ago•0 comments

The Birthday Paradox, Simulated

https://www.pcloadletter.dev/blog/birthday-paradox/
1•ronbenton•52m ago•0 comments

Fastest Encryption. Zero-Latency Decryption. Reliable Post-Quantum Security

https://abhedyam.com/
1•prabhatkr•53m ago•0 comments

UK government targets VPNs in online safety consultation as Lords vote for ban

https://www.techradar.com/vpn/vpn-privacy-security/uk-government-targets-vpns-in-new-online-safet...
3•g-b-r•1h ago•0 comments

Don't Write Docs Twice

https://tombedor.dev/make-it-easy-for-humans/
1•jjfoooo4•1h ago•0 comments

Show HN: BuryIt – Bury your failures, regrets and secrets anonymously

https://www.buryit.space/
1•noanoanoa•1h ago•0 comments

1944 informational poster of the electromagnetic spectrum

https://en.wikipedia.org/wiki/Electromagnetic_spectrum
2•winemath•1h ago•0 comments

The lies I used to tell myself

https://usefulfictions.substack.com/p/the-lies-i-used-to-tell-myself
4•jger15•1h ago•0 comments

Kolab Now: Secure and private email, calendars and more

https://kolabnow.com/
2•doener•1h ago•0 comments

Playwright CLI

https://github.com/microsoft/playwright-mcp/releases/tag/v0.0.57
1•aragonite•1h ago•0 comments

Soverin: Your Mailbox is your Digital Castle

https://soverin.com/
2•doener•1h ago•0 comments

C++ has scope_exit for running code at scope exit

https://devblogs.microsoft.com/oldnewthing/20260123-00/?p=112008
2•firesteelrain•1h ago•0 comments