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•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

Sacculina Carcini

https://en.wikipedia.org/wiki/Sacculina_carcini
1•thunderbong•1m ago•0 comments

Top AI CEOs Call for Law Protecting Against Biological Weapons

https://www.wsj.com/politics/policy/top-ai-ceos-call-for-law-protecting-against-biological-weapon...
2•whalee•2m ago•0 comments

Interfaces for Representing Uncertainty (2025)

https://digitalseams.com/blog/interfaces-for-representing-uncertainty
1•bobbiechen•4m ago•0 comments

LM/LSTS inference-injected garbage collection programming language

https://medium.com/@andrew_johnson_4/lm-lsts-hits-major-mid-stabilization-milestone-with-release-...
1•DoubleDecoded•7m ago•0 comments

Reaching 10⁻⁶ mbar for my homemade electron microscope [video]

https://www.youtube.com/watch?v=Ku04_mVZx_E
1•Audiolite•8m ago•0 comments

Epiplexity

https://andys.blog/epiplexity/
1•andytratt•11m ago•0 comments

The Cheapest Mercy

https://protortyp.github.io/posts/the-cheapest-mercy/
2•protortyp•12m ago•0 comments

Building self-improving tax agents with Codex

https://openai.com/index/building-self-improving-tax-agents-with-codex/
1•gmays•16m ago•0 comments

Google pushes water standards amid data center backlash

https://www.axios.com/2026/06/03/google-pushes-water-standards-data-center-backlash
1•1vuio0pswjnm7•17m ago•3 comments

Show HN: AI Agent that resolves all your support issues

1•Daniel-Pan•17m ago•0 comments

American capitalism has taken an apocalyptic turn

https://economist.com/business/2026/06/03/american-capitalism-has-taken-an-apocalyptic-turn
2•andsoitis•18m ago•0 comments

American Fork PD posts and removes unredacted bodycam footage

https://old.reddit.com/r/RecklessBen/comments/1tvzfv9/american_fork_pd_unredacted_bodycamdashcam_...
2•cosmicgadget•21m ago•0 comments

Strategic Petroleum Reserve

https://www.energy.gov/hgeo/opr/strategic-petroleum-reserve
1•mooreds•21m ago•0 comments

The Post That Beat The News By 38 Minutes. [video][50 mins]

https://www.youtube.com/watch?v=b2VAiFBXz-E
1•Bender•24m ago•0 comments

DOJ investigating former congressman George Santos for insider trading on Kalshi

https://www.npr.org/2026/06/02/nx-s1-5843371/george-santos-kalshi-insider-trading-investigation
2•gnabgib•26m ago•0 comments

SpaceX wins tax exemption for $55B AI chip plant despite local backlash

https://www.ft.com/content/86b2440a-60ce-4a5b-94ba-a6a4456ae574
1•1vuio0pswjnm7•27m ago•0 comments

Sil Val was built on public money-now it's fighting California's billionaire tax

https://www.morningstar.com/news/marketwatch/2026060256/silicon-valley-was-built-on-public-money-...
1•initramfs•27m ago•0 comments

Postgres IDE in Cursor

https://techcommunity.microsoft.com/blog/adforpostgresql/your-postgresql-workflow-just-found-its-...
1•gen_tp•28m ago•0 comments

Scientists uncover Feynman's formula for finding best holiday restaurant

https://www.theguardian.com/science/2026/jun/01/scientists-uncover-feynmans-formula-for-finding-b...
1•paulpauper•29m ago•0 comments

How cowboy culture remade Brazil

https://thebaffler.com/outbursts/rodeo-clowns-cowie
1•paulpauper•29m ago•0 comments

Are India's GDP figures OK after all?

https://www.ft.com/content/28783a0c-5a7c-4d6b-9485-61bdcb06e83d
2•paulpauper•30m ago•1 comments

Large AI Models in Dental Healthcare

https://arxiv.org/abs/2606.02914
1•berlianta•30m ago•0 comments

Meta Is Reportedly Working on an AI Pendant and More Smart Glasses

https://www.engadget.com/2184224/meta-developing-ai-pendant-more-smart-glass-models/
1•gmays•36m ago•0 comments

Ask HN: What would justify writing a kernel in 2026?

1•alonsovm44•36m ago•3 comments

Fridge with a Tiny Funnel Site

https://tailscale.com/blog/funnel-fridge
1•ChicknNuggt•38m ago•0 comments

The King and the Swarm

https://firstthings.com/the-king-and-the-swarm/
1•cratermoon•38m ago•0 comments

OpenAI Codex tool linked to malicious NPM supply chain attack

https://www.techradar.com/pro/security/openai-codex-tool-with-over-29-000-downloads-linked-to-mal...
1•ChicknNuggt•39m ago•0 comments

HttpBin Service

https://github.com/conductor-oss/httpbin
1•opiniateddev•41m ago•0 comments

Show HN: AI Gauge, a desktop monitor for Claude/Codex/Copilot usage limits

https://github.com/jpajak/ai-gauge
1•jpajak•44m ago•0 comments

Darknet Market Maximalism

https://antimoonboy.com/darknetmarketmaximalism/
2•Cider9986•49m ago•0 comments