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

Watching my gh actions runners

https://yeet.cx/blog/who-broke-ci
1•ok_major_9889•2m ago•0 comments

Foot-stiffening socks could make walking less tiring

https://phys.org/news/2026-11-foot-stiffening-socks.html
1•samizdis•2m ago•0 comments

Binance hackers used fake job interviews in record heist

https://www.japantimes.co.jp/business/2026/11/04/tech/binance-hackers-job-interviews-heist/
1•rawgabbit•3m ago•0 comments

LifeTrail – Passive GPS tracker, local trail history, no account

https://play.google.com/store/apps/details?id=cc.lifetrail&hl=en_US
1•LifeTrailApp•4m ago•0 comments

New Pancreatic Cancer Vaccine Sparked Immune Responses in 99% of Patients

https://www.sciencealert.com/new-pancreatic-cancer-vaccine-sparked-immune-responses-in-99-of-pati...
1•amichail•4m ago•0 comments

Make more money on consumer subscriptions with Crew Plans

https://jjmaxwell4.com/writing/crew-plans/
1•jjmaxwell4•5m ago•0 comments

Show HN: Gauge – Open-Source CLI to recursively improve your docs

https://github.com/gauge-sh/gauge-cli
1•0x63_Problems•5m ago•0 comments

SWE-2 Flash

https://cognition.com/blog/swe-2-flash
1•nicoburns•5m ago•0 comments

Juju: Modern Codeforge

https://juju.bi/
2•handfuloflight•6m ago•0 comments

The Characters of Theophrastus

https://www.eudaemonist.com/biblion/characters/
1•gregsadetsky•7m ago•0 comments

Lorem Ipsum Dot Gov Dot UK

https://shkspr.mobi/blog/2026/11/lorem-ipsum-dot-gov-dot-uk/
1•acossta•8m ago•0 comments

VMware returns to low-end server virtualization with 'vSphere Express'

https://www.theregister.com/virtualization/2026/11/04/vmware-returns-to-low-end-server-virtualiza...
1•andrewstetsenko•9m ago•0 comments

Binance hack> need better software integrity verification

1•eli-front•10m ago•0 comments

DeepSeek alone now accounts for 53% of all token volume on Openrouter

https://dirac.run/labs-market-share
1•GodelNumbering•10m ago•1 comments

Little evidence that data centers cause widespread ground warming

https://phys.org/news/2026-11-satellite-analysis-evidence-centers-widespread.html
3•samizdis•10m ago•0 comments

Travis Kalanick's Startup Seed Raising Skilzzz (2009)

https://swooshing.wordpress.com/2009/03/19/startup-seed-raising-skillzzz/
1•aditya•12m ago•0 comments

How Outlook Search is changing: ranking, resilience, and the feedback loop

https://techcommunity.microsoft.com/blog/outlook/how-outlook-search-is-changing-ranking-resilienc...
1•tech234a•12m ago•0 comments

Test and verification technique effectiveness with GPT-6 Astra

https://danluu.com/astra-testing/
1•evakhoury•12m ago•0 comments

Why is your AI using so many tokens?

https://blog.raed.dev/posts/context-window/
1•Raed667•14m ago•0 comments

1M tokens context, new tools and more – Sabiá 5 is out

https://www.maritaca.ai/blog/S5/
1•peq42•14m ago•0 comments

Code cracked for shipwreck padlock solving 400-year-old mystery

https://www.bbc.com/news/articles/c69qz9jzq4jro
1•cisc•15m ago•0 comments

The Brain Injury That Made Edward Freytag a Musical Genius

https://www.nytimes.com/interactive/2026/11/02/magazine/brain-injury-music-perfect-pitch-edward-f...
1•anarbadalov•16m ago•0 comments

I Made a Stupid Thing

https://www.unsupervised.website
2•maxius•18m ago•1 comments

Kenyan startup builds AI around mobile money and low-cost phones

https://spectrum.ieee.org/ai-small-business-mobile-money-startup
1•samizdis•19m ago•0 comments

Deserializing Quirky JSON in Rust

https://orgnizedmess.net/php-json-rust.html
1•gregsadetsky•20m ago•0 comments

Show HN: Ratio – a notepad that calculates as you type

https://useratio.app/
1•adrianhqs•24m ago•0 comments

Top Platforms to Create AI-Powered Courses and Get Certified

https://kadhar.dev/blog/top-ai-course-platforms
1•kadharmfn•24m ago•0 comments

Our hosted model's beavhior shifted overnight

https://gobeat.ai/blog/model-drift
1•brdo•25m ago•0 comments

Nintendo's cartridge maker shifts focus to data centers, hurting physical media

https://kotaku.com/nintendo-switch-cart-rom-physical-media-data-centers-manufacture-2000753293
5•haunter•25m ago•0 comments

The midterms have cost Musk close to $30B

https://www.ft.com/content/9a8d4922-74dd-4149-bb28-a15f719ca836
5•JumpCrisscross•27m ago•0 comments