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

Kagi APIs: the same search technology that powers Kagi is opening up to devs

https://kagi.com/changelog#10468
1•erwinmatijsen•45s ago•0 comments

Desktop app for managing parallel Claude Code agents

https://github.com/utensils/Claudette
1•tjek•1m ago•0 comments

Mythical Man Month

https://martinfowler.com/bliki/MythicalManMonth.html
1•ingve•3m ago•0 comments

Hosting a Site on a Raspberry Pi

https://m4rt.nl/blog/hosting-on-a-pi
1•swiftdust•7m ago•0 comments

Why didn't IPv6 work in my home network?

https://gowtham.dev/blog/ipv6-problems.html
1•birdculture•7m ago•0 comments

How Unsloth and Nvidia made LLM training 25% faster on consumer GPUs

https://unsloth.ai/blog/nvidia-collab
1•segmenta•9m ago•0 comments

Compressed Cognition: The Cost of Faster Coding

https://adamtornhill.substack.com/p/compressed-cognition-the-hidden-cost
2•nephrenka•10m ago•0 comments

Ask HN: Agent-Developed Libraries?

1•rossant•14m ago•0 comments

Null loop solves AI Model Collapse

https://medium.com/@magass139/updated-preservation-necessity-2255dddb363b
1•martynagass•15m ago•1 comments

Show HN: Starfield Screensaver for macOS

https://github.com/sami-eljabali/forever-stars-macos-screensaver
1•samieljabali•17m ago•0 comments

The Ant Odometer: Stepping on Stilts and Stumps

https://www.science.org/doi/10.1126/science.1126912
2•thunderbong•18m ago•0 comments

Show HN: AI VC Landscape – 666 Deals Mapped by Stage, Geography, and Founders

https://deepviews.xyz/research/ai-vc-landscape-en
1•rswcf•24m ago•0 comments

AI, Constraints, and the Future of Software Engineering

https://medium.com/analytics-and-data/ai-constraints-and-the-future-of-software-engineering-9ae33...
1•linkerzx•25m ago•1 comments

Leevna avis: que vaut vraiment ce complément?

https://leevna.fr/products/gummies-a-la-canneberge-formule-de-defense-urinaire-et-renale
1•Moragane•27m ago•0 comments

What It Feels Like to Do Data Science

https://lovelaceanalytics.com/posts/what-it-feels-like-to-do-data-science/
1•gabemusker•28m ago•0 comments

Everything is just files and programs

2•ghassenfaidi•28m ago•2 comments

F2c – Convert Figma designs to React/Vue inside VSCode, no plugin needed

https://marketplace.visualstudio.com/items?itemName=dujun-bot.f2c-figma-to-code
1•crazy_code•30m ago•0 comments

Stackit and neuland.ai aim to provide LLMs in European data centers

https://www.heise.de/en/news/Sovereign-AI-from-Germany-11284778.html
1•doener•30m ago•0 comments

iPhone Dumbphone

https://stopa.io/post/297#how-to-guide
2•signa11•30m ago•1 comments

Capacity Is the Roadmap

https://yusufaytas.com/capacity-is-the-roadmap
3•lurkingpm•31m ago•0 comments

ClaudeLense

https://github.com/TheNightProject/claude-lens
1•SteveChurch•32m ago•0 comments

Star Fox for Nintendo Switch 2 [video]

https://www.youtube.com/watch?v=ePZeyh5q9R8
2•wise_blood•33m ago•0 comments

CodexSaver Make Codex cheaper without making it dumber with DeepSeek

https://github.com/fendouai/CodexSaver
1•fendouai•35m ago•0 comments

Sam Altman Texts Mira Murati

https://twitter.com/TechEmails/status/2052160627884560828
2•0xedb•35m ago•0 comments

Axavive Can This "Golden Seed Switch" Transform Your Skin?

https://finance.yahoo.com/sectors/healthcare/articles/axavive-skin-exploding-2026-golden-22590060...
1•kajzsaru•37m ago•0 comments

Anthropic will let its managed agents dream

https://thenewstack.io/anthropic-managed-agents-dreaming-outcomes/
1•bhouston•37m ago•0 comments

The four horsemen behind Postgres outages

https://malisper.me/the-four-horsemen-behind-thousands-of-postgres-outages/
1•r4um•45m ago•0 comments

Alaska megatsunami was second largest ever recorded

https://www.bbc.com/news/articles/c1m253033m4o
5•BaudouinVH•45m ago•0 comments

The "AI Job Apocalypse" is a complete fantasy

https://www.a16z.news/p/the-ai-job-apocalypse-is-a-complete
1•thoughtpeddler•48m ago•0 comments

Show HN: Codex Pets – tiny animated pets for web apps

https://froemic.github.io/codex-pets-web/
1•froemic•48m ago•1 comments