frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Any good tools to pgdump multi tenant database?

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

Ask HN: What have you used natural language identification tools for?

1•nitotm•1m ago•0 comments

Maersk Middle East Operational Update 35

https://www.maersk.com/news/articles/2026/06/10/middle-east-operational-update-35
1•mooreds•3m ago•0 comments

EU AI: the fables we told ourselves

https://pleias.ai/blog/fable-eu
1•barrenko•4m ago•0 comments

Secondary Stops in Cities on Intercity Rail

https://pedestrianobservations.com/2026/06/03/secondary-stops-in-cities-on-intercity-rail/
1•mooreds•4m ago•0 comments

The 2-Year Apartment Rule

https://tadaima.bearblog.dev/the-2-year-apartment-rule/
1•surprisetalk•4m ago•0 comments

I was obsessed with money then I found philosophy

https://dariusforoux.com/i-was-obsessed-with-money-then-i-found-philosophy/
1•RickJWagner•4m ago•0 comments

Solving the hallucination problem in agents – with loops and math

https://kasparvongruenberg.substack.com/p/solving-the-hallucination-problem
1•mooreds•4m ago•0 comments

India's solution to entrance exam fraud: A temporary ban on Telegram

https://www.cnbc.com/2026/06/16/indias-solution-to-entrance-exam-fraud-a-temporary-ban-on-telegra...
1•LordAtlas•5m ago•0 comments

dj_queue: DB-backed queue backend for django.tasks

https://github.com/coriocactus/dj_queue
1•coriocactus•5m ago•0 comments

How much an Uber driver makes in Boston

https://www.boston.com/community/readers-say/2026/06/15/heres-how-much-an-uber-driver-makes-in-bo...
1•ripe•9m ago•1 comments

Show HN: Query the Murder – Learn SQL by Solving Agatha Christie Mysteries

https://querythemurder.com/
1•jenikashah07•9m ago•0 comments

Don't run SQL migrations in tests: How I sped up the test suite by 2x

https://gaultier.github.io/blog/I_sped_up_the_test_suite_by_x2.html
1•birdculture•13m ago•0 comments

NEET: India temporarily bans Telegram to tackle fraud in key medical exam

https://www.bbc.com/news/articles/cn074j04l3eo
1•colinprince•13m ago•0 comments

What's your Opinion onm he recent updates on Fable 5?

1•shymasen•14m ago•1 comments

Oracle Cerner: Potential Acquirers of Oracle Health

https://www.healthcare.digital/single-post/oracle-cerner-potential-acquirers-of-oracle-health
1•akyuu•14m ago•0 comments

Show HN: Codify – Terraform for Dev Environments

https://codifycli.com/
1•kevinwang5658•15m ago•0 comments

FootyChat – Live fan chat and scores for World Cup 2026

https://footychat.app/
1•olympikesoft•16m ago•0 comments

GoLongRL: Capability-Oriented Long Context RL with Multitask Alignment

https://github.com/xiaoxuanNLP/GoLongRL
1•pbd•18m ago•0 comments

Awesome Bash: A curated list of delightful Bash scripts and resources

https://github.com/awesome-lists/awesome-bash
1•martinlaz•18m ago•0 comments

Survey: Pro-Democratic Social Views Vary by Social Media Platform

https://news.gallup.com/poll/710702/pro-democratic-social-views-vary-social-media-platform.aspx
1•giuliomagnifico•20m ago•0 comments

Codex Is Down

https://status.openai.com/incidents/01KV7ZT644J4V94GSXMFPY2ANR
4•jampekka•22m ago•0 comments

Native Bitcoin Token Protocol

https://boltassociation.com/
2•honohanf•23m ago•1 comments

Welcome to the Agentic Era. Ready or Not

https://www.mikehyland.com/blog/welcome-agentic-era
1•mjhyl•23m ago•0 comments

MiniForge – describe a game, get IAP, GPU compute, and leaderboards free

https://miniforge.buzzchat.site
1•abilafredkb•24m ago•0 comments

SpaceX to buy Cursor for $60B (WSJ)

https://www.wsj.com/business/spacex-agrees-to-buy-ai-coding-agent-cursor-for-60-billion-7a473340
7•Retz4o4•26m ago•0 comments

Savearoundtrip: Publish an HTTPS DNS record, skip a round trip

https://savearoundtrip.com/
1•cimnine•27m ago•0 comments

Commodore's new flip phone blocks social media and browsers

https://arstechnica.com/gadgets/2026/06/commodores-newest-gadget-is-a-flip-phone-that-blocks-soci...
2•bookofjoe•30m ago•0 comments

How Intelligent Automation Works

https://geekyants.com/blog/how-intelligent-automation-is-cutting-healthcares-600-billion-administ...
2•shymasen•31m ago•0 comments

Generative Models (2016)

https://openai.com/index/generative-models/
1•capitalatrisk•31m ago•0 comments

Show HN: Rnet-OAuth-Python – Python lib for user-funded AI API access

https://github.com/rNetAi/rnet-oauth-python
1•nextma•36m ago•1 comments