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

Vircon32 Games: 93 free homebrew titles, playable in the browser

https://vircon32.joyrider3774.xyz/
1•carra•1m ago•1 comments

Show HN: Syncle – Sync Postgres, MySQL, SQLite, MongoDB and Redis to Each Other

https://syncle.dev
1•osmanahmadxai•4m ago•0 comments

Radio Setup That Tracks Nearby Cars via Tire Sensors

https://github.com/merbanan/rtl_433
1•CGMthrowaway•4m ago•0 comments

I built a multiplayer version of the 4,500-year-old Royal Game of Ur

https://royalgameofur.app
3•potentdream•6m ago•0 comments

(Parody, A.I.) Neighbor Sun-Bathing Nude [Oklahoma]

https://archive.org/details/oklahoma-governor-dhs-secretary-jokes-1
1•OkieSmokie3•7m ago•0 comments

AWS to acquire DuckLabs, the Amsterdam-based company behind DuckDB

https://www.aboutamazon.com/news/company-news/aws-ducklabs
2•saganus•8m ago•0 comments

Principle Driven Development

https://principledriven.dev/
2•bushido•8m ago•0 comments

NIH wants to shroud peer review scores. Here's what you can do about it

https://27unihted.substack.com/p/nih-wants-to-shroud-peer-review-scores
2•SubiculumCode•8m ago•0 comments

Kalshi bans ex-Congressman for life concluding he likely was insider trading

https://apnews.com/article/kalshi-george-santos-lifetime-ban-c8ac3e25aec55cd5509485a84f79f9e0
2•theanonymousone•8m ago•0 comments

Re-engineering Apache Airflow for speed and scale

https://www.astronomer.io/blog/astro-airflow-re-engineered-for-speed-and-scale/
2•jlaneve•10m ago•0 comments

How an MIT research project became a global programming language

https://news.mit.edu/2026/how-mit-research-project-became-global-programming-language-0831
2•markkitti•11m ago•1 comments

Fake Logos

https://github.com/pigment/fake-logos
1•opengrass•13m ago•0 comments

Agentic/Human Contractor distributed marketplace

1•godcreatebugs•13m ago•0 comments

Swiss nuclear plant back online after heatwaves

https://sg.news.yahoo.com/swiss-nuclear-plant-fully-back-123711589.html
1•leonidasrup•14m ago•0 comments

VibeCoded AI-Slop License v1.0

https://gist.github.com/NicolasCARPi/3fd349ed1ed52ae6b835d5364cda4cd6
2•birdculture•16m ago•0 comments

A walkable ASCII cyberpunk city in one HTML file [video]

https://www.youtube.com/watch?v=3YtygAx_C6A
8•keithcarolus•17m ago•3 comments

From poop to plants, how wolves help blueberries grow and spread in Minnesota

https://www.mprnews.org/story/2026/08/30/how-wolves-help-blueberries-grow-and-spread-in-northern-...
1•rznicolet•17m ago•0 comments

Whatareyoubuilding.ai – indie builder and AI product directory

https://whatareyoubuilding.ai/
1•ilreb•18m ago•0 comments

FTC to File Lawsuit Alleging Amazon Deceived Advertisers

https://www.wsj.com/tech/ftc-to-file-lawsuit-alleging-amazon-deceived-advertisers-d71039ee
1•uxhacker•18m ago•0 comments

Is your Shopify store visible to ChatGPT? A free AI-visibility scanner

https://rankinai.surge.sh/
1•geo_signal•19m ago•0 comments

The Anatomy of a U.S. Presidential Motorcade

https://people.howstuffworks.com/presidential-motorcade.htm
2•thunderbong•19m ago•0 comments

Airlink planes fly remarkably low over DHL Stadium before Springboks game

https://www.capetownetc.com/news/watch-airlink-planes-fly-remarkably-low-over-dhl-stadium-before-...
1•tevrede•21m ago•0 comments

Bankers: EU must tap trillions of euros in private savings to keep up w US/China

https://www.reuters.com/world/china/eu-must-tap-trillions-euros-private-savings-keep-up-with-us-c...
1•CGMthrowaway•22m ago•2 comments

LLM tokens aren't the new dollars

https://avaprotocol.org/blog/tokens-arent-the-new-dollars
1•kezjo•23m ago•0 comments

Tailcat

https://tailscale.com/blog/tailcat
2•0xedb•24m ago•0 comments

How cooked are you from vibecoding?

https://codeset.ai/fried
1•Nfsaavedra•25m ago•1 comments

Apple CEO Tim Cook's Legacy Is Dull Products and Spineless Capitulation

https://karlbode.com/apple-ceo-tim-cooks-legacy-is-dull-products-and-spineless-capitulation/
4•HotGarbage•25m ago•2 comments

The safest job from AI may be writing

http://muratbuffalo.blogspot.com/2026/08/the-safest-job-from-ai-may-be-writing.html
22•ilreb•26m ago•13 comments

Show HN: 10x token savings for AI Web Scraping

https://www.makralabs.org/about
2•ritsource•27m ago•0 comments

TimesFM-3: A zero-shot foundation model for multivariate forecasting

https://research.google/blog/timesfm-3-a-zero-shot-foundation-model-for-multivariate-forecasting/
2•xnx•28m ago•0 comments