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

Run WSL2 Fedora with Mainstream/Rolling Linux Kernel

https://blog.benyamin.xyz/2026/06/27/run-wsl2-fedora-with-mainstream-rolling-linux-kernel/
1•benlimanto•1m ago•0 comments

GNU Parallel 20260622 ('Rape Gang Inquiry') Released

https://lists.gnu.org/archive/html/parallel/2026-06/msg00000.html
1•jiqiren•4m ago•1 comments

Panoptes – AI audit and alignment layer

https://github.com/miggy-code/Panoptes
1•mpadilla•4m ago•1 comments

I'm Not Good at Goodbyes

https://hannahaubry.online/im-not-good-at-goodbyes
1•backlit4034•5m ago•0 comments

Optimizing open-source FPGA 80386 for performance gains

https://hackaday.com/2026/07/06/performance-improvements-for-open-source-80386/
1•whiteblossom•7m ago•0 comments

Show HN: Emem.dev – signed earth memory for physical AI

1•avijeetsingh16•8m ago•0 comments

A nonsense phrase of shady provenance makes the rounds, Elsevier defends its use

https://retractionwatch.com/2025/02/10/vegetative-electron-microscopy-fingerprint-paper-mill/
1•jacquesm•8m ago•0 comments

Max Ginsburg, War Pieta, 2007

https://narrativepainting.net/max-ginsburg-war-pieta-2007/
2•halperter•18m ago•0 comments

'Our business today is not healthy': MSFT looks to 'reset' gaming division

https://fortune.com/2026/07/06/microsoft-xbox-layoffs-gaming-division-1600-4800-employees/
1•1vuio0pswjnm7•22m ago•1 comments

Albuquerque Modernism: Manera Nueva and Steve Baer

https://albuquerquemodernism.unm.edu/posts/cs14_manera_nueva_placitas.html
1•PaulDavisThe1st•22m ago•0 comments

Show HN: Storytelling for coding agents, using Pixar's story process

https://kashyab.com/blog/teaching-a-coding-agent-to-write-stories.html
2•Kashyab12•23m ago•0 comments

OSS Local AI Workspace

https://www.usestitch.ai/
1•tomEdison•28m ago•0 comments

Sculpt a Vase

https://killedbyapixel.github.io/VaseFX/
2•memalign•30m ago•2 comments

Microsoft to cut 4,800 jobs in major Xbox and gaming division 'reset'

https://www.fastcompany.com/91569769/xbox-layoffs-microsoft-sharma
2•1vuio0pswjnm7•37m ago•1 comments

Machine Is a Server. Do Not Power Down

https://adlternative.github.io/posts/ai/from-local-agent-to-cloud-agent/
1•adltereturn•38m ago•0 comments

AutomationBench-AA

https://artificialanalysis.ai/articles/announcing-zapier-automationbench-aa
1•jameson•38m ago•0 comments

Taste when your user has no eyes

https://twitter.com/renzo_viale/status/2068730076989186283
1•rvialep•38m ago•0 comments

Gadgets for People Who Don't Trust the Government [video]

https://www.youtube.com/watch?v=W_F4rEaRduk
1•Bender•39m ago•0 comments

How Do Synthesizers Work? (An Interactive Exploration)

https://perthirtysix.com/how-the-heck-do-synthesizers-work
2•gmays•40m ago•1 comments

Show HN: • Introducing Dotflowy

https://twitter.com/CameronPak/status/2074262605779124317
1•campak•41m ago•1 comments

Apple 'Hide My Email' Vulnerability Reveals Peoples' Real Email Addresses

https://www.404media.co/apple-hide-my-email-vulnerability-reveals-peoples-real-email-addresses/
1•1vuio0pswjnm7•45m ago•1 comments

Link Site

https://xxsml.com
1•sohocs509•47m ago•1 comments

First Kirby Game Was Created with a Trackball, No Keyboard

https://www.pcmag.com/news/first-kirby-game-was-created-with-a-trackball-no-keyboard
2•scottchiefbaker•49m ago•0 comments

Show HN: Foundation – A Tale of Tokens and Psychosis

https://github.com/nmxmxh/foundation
1•MomohNobert•51m ago•0 comments

Freemediaheckyeah

https://fmhy.net/reading
1•kamphey•54m ago•0 comments

Building a Datacenter in My Dorm Room

https://corvaglia.dev/blog/2026/datacenter-in-dorm/
1•corvad•55m ago•0 comments

Windows 11 will soon be able to reinstall itself and drivers without a USB drive

https://www.windowscentral.com/microsoft/windows-11/windows-11-will-soon-be-able-to-reinstall-its...
2•thunderbong•55m ago•1 comments

Cases of parasite that causes explosive bathroom emergencies surge to nearly 600

https://www.dailymail.com/health/article-15956735/cyclospora-parasite-outbreak-michigan-restauran...
3•Bender•1h ago•0 comments

X Launches iOS Video Editor with Captions and Green Screen

https://twitter.com/nikitabier/status/2074218166033781048
1•mak8•1h ago•0 comments

Decomposer: Learning to Decompile Symbolic Music (Like MIDI) to Programs

https://arxiv.org/abs/2607.01849
1•laybak•1h ago•0 comments