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

Show HN: Making a smart TV dumb and then smart

https://github.com/anubhavmalhotra/r2d2-tv
1•animalhot•2m ago•0 comments

Elon Musk Just Threatened the Coming Democratic Majority

https://www.thebignewsletter.com/p/elon-musk-just-threatened-the-coming
1•chmaynard•3m ago•0 comments

Scoop: Unvetted AI agents are accessing U.S. bank accounts

https://www.axios.com/2026/10/22/ai-agents-banks-unauthorized-accounts-access
1•choult•6m ago•0 comments

GM Aims to Bring 'Eyes-Off' Driving to AI-Powered Cars Within 2 Years

https://www.nytimes.com/2026/10/21/business/gm-ai-electric-vehicles-china.html
1•bookofjoe•7m ago•1 comments

From Eyeballs to ARR: Buzzy Pricing Metrics and the AI Trade

https://aswathdamodaran.substack.com/p/from-eyeballs-to-arr-buzzy-pricing
1•toomuchtodo•7m ago•0 comments

America is Booming into a Ghost Town [video]

https://www.youtube.com/watch?v=rX0RuKswLAo
1•idbnstra•12m ago•0 comments

Getty Images files for US bankruptcy, advances restructuring plan

https://www.reuters.com/legal/litigation/getty-images-files-us-bankruptcy-advances-restructuring-...
2•CharlesW•15m ago•0 comments

Mapping the Northern Sky

https://www.maps.com/star-map-charts-stars-and-constellations-of-northern-hemisphere/
4•tmseidman•16m ago•0 comments

Jank – The native Clojure dialect with seamless C++ interop

https://jank-lang.org/
1•giancarlostoro•16m ago•0 comments

L'Oreal says weight loss drugs are impacting beauty and skin care sales

https://www.bbc.com/news/articles/cvglwgwpgrlpo
2•BiraIgnacio•17m ago•0 comments

kirsch – A versatile bitmap font with an organic flair

https://github.com/molarmanful/kirsch
1•noriax86•17m ago•0 comments

Show HN: Impossible Machines: declaratively program the physical world

https://www.impossiblemachines.xyz
1•bhaprayan•18m ago•0 comments

Neal.fun – About

https://neal.fun/about/
1•thunderbong•19m ago•0 comments

Moderna and Merck cancer vaccine met key endpoints in melanoma trial

https://www.statnews.com/2026/10/22/esmo-moderna-merck-cancer-vaccine-intismeran-data-released/
1•bryan0•27m ago•0 comments

Docker Is Weird

https://codeandcake.dev/posts/2026-10-22-docker-is-weird
3•psxuaw•27m ago•0 comments

AI compute is the new oil–and needs a new market

https://www.economist.com/finance-and-economics/2026/10/22/ai-compute-is-the-new-oil-and-needs-a-...
2•ijidak•28m ago•0 comments

UN says breaching 1.5C warming limit is 'imminent and unavoidable'

https://www.cnn.com/2026/10/21/climate/cop31-un-climate-report-emissions-gap
5•dabinat•35m ago•2 comments

Amazon won't build data centers in Loudoun County in deal with local leaders

https://www.washingtonpost.com/dc-md-va/2026/10/22/amazon-wont-build-data-centers-loudoun-county-...
1•reaperducer•36m ago•0 comments

WolfSentry: WolfSSL's Embedded Intrusion Detection and Prevention System (IDPS)

https://github.com/wolfSSL/wolfsentry
1•aidangarske•37m ago•0 comments

The Next Bottleneck in AI for Science

https://www.mixtureofexperts.co/p/the-next-bottleneck-in-ai-for-science
1•gmays•45m ago•0 comments

We Have Traits at Home

https://www.axelmagn.com/blog/202610-zig-traits/
1•Ygg2•49m ago•0 comments

We probably cannot automate the software engineer away

https://thelastsoftwareengineer.substack.com/p/we-probably-cannot-automate-the-software
3•azhenley•52m ago•0 comments

Coding Magic the Gathering in C# – Part Two – The Impossible Magic Card

https://www.youtube.com/watch?v=Xbfzye07Xrg
3•birdculture•53m ago•0 comments

Building Saver Insights: Turning particles into a graph

https://up.com.au/blog/saver-insights/
1•0neSe7en•54m ago•0 comments

Elon Musk pours $366M into midterm Republican campaigns

https://www.cnbc.com/2026/10/22/elon-musk-midterm-election-spacex-tesla.html
9•Alien1Being•55m ago•3 comments

GitHub now uses a generic avatar instead of "Identicons" for new profiles

5•winkelmann•57m ago•1 comments

OpenAI trims valuation target after pitching higher price

https://www.ft.com/content/bb564eb1-79d4-4694-aa24-1155202a9abc
2•Alien1Being•57m ago•1 comments

DisplaySwitcher

https://nebulasoftware.com/product/displayswitcher/
1•BoydEdmondson•57m ago•0 comments

Geoffrey Hinton: 'I think there's a 1% chance it will destroy us'

https://english.elpais.com/science-tech/2026-10-21/geoffrey-hinton-the-godfather-of-ai-im-not-a-d...
1•geox•1h ago•0 comments

Attie

https://attie.ai/login
1•jcbhmr•1h ago•0 comments