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

I was never a fan of the calculator

https://www.youtube.com/watch?v=r_Byrs11ccM
1•gugagore•40s ago•0 comments

Analog Hero

https://www.plough.com/articles/analog-hero
2•onefiftymike•1m ago•0 comments

Colorfigures

https://april-zhu.com/colorfigures
2•the-mitr•4m ago•0 comments

Binary read replicas in PostgreSQL, Part 2

https://thebuild.com/blog/binary-read-replicas-in-postgresql-part-2/
2•securitytxt•5m ago•0 comments

Cutting Snowflake task warehouse wake-ups 92% by changing the schedule [video]

https://www.youtube.com/shorts/c5OXgUPL0iU
2•yanivleven•6m ago•0 comments

Diamond Transistor

https://www.df.com/diamond-transistor
2•Gravityloss•6m ago•0 comments

Reinventing the Pencil Sharpener [video]

https://www.youtube.com/watch?v=0Gi5Z51KdUE
2•surprisetalk•6m ago•0 comments

OpenAI trims valuation target to $1.25T after pitching higher price

https://www.ft.com/content/bb564eb1-79d4-4694-aa24-1155202a9abc
2•cik•7m ago•0 comments

Show HN: Kavela – AI Automations that do not fail silently

https://kavela.ai
1•tyhh00•8m ago•0 comments

The lifelong orgasm gap: exploring age's impact on orgasm rates

https://pmc.ncbi.nlm.nih.gov/articles/PMC11217024/
2•bushwart•9m ago•0 comments

Show HN: Vericto – Check AI agents' SQL before Postgres or MySQL runs it

https://github.com/vericto/vericto-proxy
1•donkan168•10m ago•0 comments

Show HN: SenderWire – I'm building a social platform

https://senderwire.com/
1•Threatthriver•10m ago•0 comments

A Farewell to Hubs

https://arcan-fe.com/2026/10/23/a-farewell-to-hubs/
1•kogasa240p•10m ago•0 comments

America must reverse Trump's moral squalor

https://www.theguardian.com/commentisfree/2026/oct/23/trump-moral-squalor
1•hkhn•10m ago•1 comments

Babashka – Fast native Clojure scripting runtime

https://babashka.org
1•andsoitis•12m ago•0 comments

New previously unseen videos from Tiananmen Square

https://www.lemonde.fr/en/international/video/2026/08/14/tiananmen-square-massacre-le-monde-revea...
1•throw0101c•13m ago•0 comments

Strategies for Better Claude Cache Usage

https://www.dgrcode.com/blog/claude-cache
1•dgrcode•13m ago•0 comments

The language that says no: from Milner's LCF to agents writing OCaml

https://hypha.pub/the-language-that-says-no
1•zaiev•14m ago•0 comments

I Built a Modern UK Government Service Using COBOL

https://nooshu.com/blog/2026/10/20/i-built-a-modern-uk-government-service-using-cobol/
2•joelanman•15m ago•0 comments

Popular AI Agent Skills Every Developer Should Know

https://jsdev.space/30-agent-skills/
1•javatuts•15m ago•0 comments

UK council accuses Microsoft of "blackmail" as software fees jump 15%

https://www.neowin.net/news/uk-council-accuses-microsoft-of-blackmail-as-software-fees-jump-15/
2•robtherobber•16m ago•0 comments

Show HN: Using prediction margins to decide when to trust your classifier

https://jeffyclassify.com/blog/confidence-routing/
1•nico•16m ago•2 comments

How to Run Large-Scale Web Scraping Jobs

https://www.zenrows.com/blog/large-scale-web-scraping-zenrows-batch
2•adelekeabdulgan•17m ago•0 comments

Show HN: Loudwalk – Review your Anki deck out loud on a walk

https://loudwalk.com/?from=hn
3•cracadumi•18m ago•0 comments

Growing Trees

https://brashandplucky.com/2026/10/15/growing-trees.html
2•ibobev•19m ago•0 comments

Gaussian Splats part 3: There's always a bigger scene

https://www.magnopus.com/blog/gaussiansplats-part-3-theres-always-a-bigger-scene
1•ibobev•19m ago•0 comments

Don't throw it all away: Caching an immediate-mode UI

https://blickeditor.com/blog/caching-an-immediate-mode-ui
1•ibobev•19m ago•1 comments

Coxon Day

https://www.thenewcritic.com/p/coxon-day
1•gmays•19m ago•0 comments

Show HN: Turm.dev – Agent computers that are cheap, simple, and built in Europe

https://turm.dev
1•j-bu•20m ago•0 comments

Firecrawl Government and Legal Index

https://www.firecrawl.dev/gov-index
2•bluepeter•20m ago•0 comments