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

Notes on Lagrange Interpolating Polynomials

https://eli.thegreenplace.net/2026/notes-on-lagrange-interpolating-polynomials/
2•ibobev•48s ago•0 comments

Vend-O-Vision: Trading Quarters for Watching TV in Public

https://hackaday.com/2026/02/28/vend-o-vision-trading-quarters-for-watching-tv-in-public/
2•HardwareLust•1m ago•0 comments

Ask HN: Who is hiring? (March 2026)

2•whoishiring•1m ago•1 comments

Ask HN: Who wants to be hired? (March 2026)

2•whoishiring•1m ago•6 comments

Show HN: Open-source Loom / Screen Studio with editing and auto-zoom

https://github.com/jkuri/Reframed
2•kundi•1m ago•0 comments

One-Bit Delay

https://onebitdelay.com/
1•surprisetalk•2m ago•0 comments

Members only: "Won't Fix" self help

https://www.joanwestenberg.com/members-only-wont-fix-self-help/
2•surprisetalk•2m ago•0 comments

A Geometric Interpretation of the 3D Cross Product (2024)

https://matejlou.blog/2024/02/26/a-geometric-interpretation-of-the-3d-cross-product/
1•surprisetalk•2m ago•0 comments

My OpenClaw agent built a website to explain AI to humans

https://www.explainme.ai/
1•yogini•2m ago•0 comments

When I lost my university email, my identity as scientist took an unexpected hit

https://www.science.org/content/article/when-i-lost-my-university-email-my-identity-scientist-too...
2•pseudolus•2m ago•0 comments

Digital forestry team combines AI with satellite data to monitor urban trees

https://phys.org/news/2026-02-digital-forestry-team-combines-ai.html
1•PaulHoule•2m ago•0 comments

A paper about Typst, written in Typst in the IJIMAI journal

https://forum.typst.app/t/a-paper-about-typst-written-in-typst-and-with-an-official-typst-based-t...
1•mstep•3m ago•0 comments

LLM Use in the Python Source Code

https://blog.miguelgrinberg.com/post/llm-use-in-the-python-source-code
1•ibobev•3m ago•0 comments

Show HN: Open Finder files in Google Docs with one click

https://glint.statictype.org/
1•statictype•3m ago•1 comments

Emergent Self-Assembly of Sustainable Plastics Based on Amino Acid Nanocrystals

https://pubs.acs.org/doi/10.1021/acsnano.3c02528
2•moritzwarhier•3m ago•0 comments

Training microgpt 19,000x faster on M5 Mac

https://github.com/Entrpi/eemicrogpt
2•easygenes•3m ago•1 comments

The Bucket Argument

https://github.com/DeepBlueDynamics/das-eimerargument
3•kordlessagain•4m ago•0 comments

The Thrill of Science in 2042

https://nautil.us/the-thrill-of-science-in-2042-1270684/
2•Brajeshwar•4m ago•0 comments

Simulations show a path to 'ideal glass' with crystal-like entropy

https://phys.org/news/2026-02-simulations-path-ideal-glass-crystal.html
2•Brajeshwar•4m ago•0 comments

Schools weren't broken until Silicon Valley used lie to convince them they were

https://fortune.com/2026/03/01/american-schools-broken-silicon-valley-edtech-gen-z-test-scores/
3•Brajeshwar•5m ago•0 comments

Anthropic/Claude status, signs of what to come of stability?

https://status.claude.com/uptime
2•erksa•5m ago•1 comments

What It Takes to Build an AI Agent

https://chatbotkit.com/reflections/what-it-really-takes-to-build-an-ai-agent
2•_pdp_•5m ago•0 comments

What It Takes to Build an AI Agent

https://next.chatbotkit.com/reflections/what-it-really-takes-to-build-an-ai-agent
2•_pdp_•6m ago•0 comments

Saturday's attack was The Pentagon's first use of one-way "kamikaze" drones

https://laststandonzombieisland.com/2026/03/02/uno-reverso/
2•speckx•6m ago•0 comments

The exploitation paradox in Open Source [pdf]

https://cfp.cfgmgmtcamp.org/media/ghent2026/submissions/KP9YPK/resources/slides-fontana-cfgmgmtca...
2•Tomte•8m ago•0 comments

Felix "fx" Lindner has died

https://blog.recurity-labs.com/2026-03-02/Farewell_Felix
2•is_taken•8m ago•0 comments

Emotional Bids and Other Neurodivergent Learnings

https://www.jerry.wtf/posts/affect-bids-and-other-neurodivergent-learnings/
2•personjerry•9m ago•0 comments

Kuwait shot down 3 US F-15E jets on accident, US Military says [video]

https://www.youtube.com/watch?v=ocwkL95tF8U
3•handfuloflight•9m ago•0 comments

Plug-In Solar Power Could Be Coming to a Balcony Near You

https://www.sierraclub.org/sierra/plug-solar-power-could-be-coming-balcony-near-you
1•jamesgill•9m ago•0 comments

DHS 7-Zone Mattress: Targeted Pressure Relief for Every Body Region

https://dreamhomestore.co.uk/collections/mattresses
1•lewisrichson•10m ago•1 comments