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

Uber Ordered to Pay $40M to Parents of Passenger After Driver Left Her

https://www.panish.law/2026/09/uber-ordered-to-pay-40-million-to-parents-of-emily-normandin-parke...
1•sensanaty•1m ago•1 comments

CNN, MS Now and Politico Barred from White House After Trump Announces Ban

https://www.nytimes.com/2026/09/19/business/media/trump-white-house-press-ban.html
1•layer8•2m ago•0 comments

Ask HN: ICLR went from 143 submissions to 62,301 submission IDs – what happened?

2•luxshan_t•3m ago•0 comments

Britain created Iraq to control its oil, then installed its own king [video]

https://www.youtube.com/watch?v=Dh7nJNKrDdo
1•teleforce•3m ago•0 comments

Props Are Not a Design System

https://vitonsky.net/blog/2026/09/18/design-system/
1•RohanAdwankar•4m ago•0 comments

Russia reports 'powerful' cyberattacks on second day of parliamentary vote

https://www.aljazeera.com/news/2026/9/19/russia-reports-powerful-cyberattacks-on-second-day-of-pa...
1•mikhael•4m ago•0 comments

Infillion Buys Foursquare

https://app.dealroom.co/news/note/infillion-buys-foursquare-adding-location-data-to-its-ad-platform
1•edent•5m ago•0 comments

A Machine That Can Have Grandchildren

https://artemandreenko.com/blog/a-machine-that-can-have-grandchildren/
2•miovoid•9m ago•1 comments

Show HN: Built a local guardrail layer for Claude Code

https://github.com/ioni-dev/mati
1•fennect•10m ago•0 comments

Regolith Desktop status updates Sep 2026

https://regolith-desktop.com/posts/status_update_09_26/
1•thinkmassive•12m ago•0 comments

Trump announces agreement to secure 'permanent' control over Greenland security

https://www.nbcnews.com/politics/trump-administration/trump-announces-agreement-denmark-secure-pe...
2•ijidak•12m ago•0 comments

I still haven't bought into true RSI

https://www.interconnects.ai/p/where-i-stand-on-rsi
2•pretext•13m ago•0 comments

Periodic Table – Ptable

https://ptable.com/?lang=en
2•thunderbong•16m ago•0 comments

Leaving DigitalOcean, one site at a time

https://keith.is/post/leaving-digitalocean/
4•carnevalem•19m ago•0 comments

China's Electric Aviation Advantage Is a Transport System, Not a Prototype

https://cleantechnica.com/2026/09/19/china-electric-aviation-transport-system/
3•gumby•22m ago•0 comments

A Workaphile's Apology

https://moalquraishi.wordpress.com/2026/08/10/a-workaphiles-apology/
1•maxall4•25m ago•0 comments

Show HN: MNIST64 – 99.5% accuracy MNIST BNN on a stock Commodore 64

https://github.com/jarnoh/mnist64
1•jmagic•26m ago•0 comments

"AI Models Now Introduce Safety Risks in the Physical World"

https://www.micro1.ai/research/ai-models-now-introduce-safety-risks-in-the-physical-world
2•MilnerRoute•27m ago•0 comments

Julian Assange: I'm Back

https://twitter.com/JulianAssange/status/2100571158777045331
3•hackandthink•27m ago•0 comments

The Norse Wanderer Pirate Apple ][ 1986 BBS Is Online

https://norsewanderer.com/
1•mheilemann•27m ago•0 comments

Speaking with the Mind – Neuralink [video]

https://www.youtube.com/watch?v=_j806JHhCRo
1•Audiophilip•28m ago•0 comments

AI is just another programming tool

https://norsewanderer.com/blog/blog1.html
3•mheilemann•30m ago•0 comments

Lemmings: Russian Persona Provisioning and Management for Active Measures

https://dti.domaintools.com/research/lemmings-russian-persona-provisioning
3•dmarto•33m ago•0 comments

A year of Omarchy Linux as my daily driver

https://www.ssp.sh/blog/omarchy-linux-quattro/
3•zazuke•34m ago•0 comments

The Void Job

https://yusufaytas.com/the-void-job
7•yusufaytas•34m ago•0 comments

Show HN: CUA-S1 – A System One Model for Computer Use

https://github.com/trycua/cua
1•frabonacci•40m ago•0 comments

How many times will my son see my parents?

https://countyourtimes.com/our-son
1•alexjray•40m ago•1 comments

Lawsuit Accuses Anthropic, OpenAI, SpaceXAI, Google of AI Pacing 'Collusion'

https://thehill.com/policy/technology/6099571-lawsuit-accuses-anthropic-openai-spacexai-google-of...
6•theanonymousone•41m ago•0 comments

Long Range WiFi [video]

https://www.youtube.com/watch?v=ZQ62gajj54Y
1•gus_massa•49m ago•0 comments

Four AI lab breaches were caused by a single underlying issue, Irregular says

https://thenextweb.com/news/irregular-four-labs-one-issue-disclosure-timeline-gemini
3•wickedwiesel•49m ago•0 comments