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

When should an agent own the control flow?

https://www.calm.rocks/blog/pipeline-vs-agent/
1•calmrocks•47s ago•0 comments

US Bars Microsoft, Indian Firms from Visa Program in Blow

https://news.bloomberglaw.com/daily-labor-report/us-suspends-visa-program-for-tech-firms-includin...
2•nomagicbullet•5m ago•0 comments

AHM Statement on OpenAI's October 6 Release of Mathematical Documents

https://terrytao.wordpress.com/2026/10/07/ahm-statement-on-openais-october-6-release-of-mathemati...
1•doppp•8m ago•0 comments

Is society growing stupider? The clues are simple and repeated

https://www.washingtonpost.com/opinions/2026/10/07/culture-is-getting-simpler-that-should-worry-you/
5•pseudolus•9m ago•1 comments

From 35 seconds to half a second: 70× faster dashboards in plain Postgres

https://foresite.dev/blog/postgres-daily-rollups
1•cheesemoopy•9m ago•0 comments

Ranked: The Biggest Military Drone Exporters

https://www.visualcapitalist.com/ranked-countries-exporting-most-military-drones/
4•snarky-comments•12m ago•0 comments

Bending the Curve of Discovery: AI in Science Today and Tomorrow

https://institute.deepmind.com/essays/bending-the-curve-of-discovery-ai-in-science-today-and-tomo...
3•rkp8000•15m ago•0 comments

He built his own Flock-style camera to track police. The police didn't like it

https://san.com/cc/he-built-his-own-flock-style-camera-to-track-police-the-police-didnt-like-it/
3•crummy•15m ago•0 comments

PEP 848: Generational Incremental Garbage Collection

https://discuss.python.org/t/pep-848-generational-incremental-garbage-collection/109214
3•lumpa•17m ago•0 comments

Pyronaut

https://pyronaut.io/2026/10/02/introducing-pyronaut/
2•ejboy•19m ago•0 comments

Metadata Reactor – image to structured exportable text

https://metadatareactor.com/
2•nationalsun•22m ago•0 comments

Europe changes time forward soon, North America next, for the last time?

https://anarc.at/blog/2026-10-08-dst-warning/
2•lumpa•22m ago•0 comments

Why AI hasn't fixed software delivery yet, and what will

https://m1spec.com/why/
1•ahmedfouad•26m ago•0 comments

Linux Distro Called

https://waydro.id
5•aceave•27m ago•1 comments

Show HN: Auro, a package manager built for easy creation of packages

https://github.com/EliCJonas/auro
2•CodeGuyEli•27m ago•0 comments

SpaceX Makes Big Play to Become a Wireless Carrier

https://www.wsj.com/business/telecom/spacex-makes-big-play-to-become-a-wireless-carrier-a90b2a1b
3•bcaulfield•28m ago•0 comments

Show HN: Peer-to-peer web search over the YaCy network

https://search.my-yacy-node.org/
3•nikitakarpei•29m ago•0 comments

Plausibly fastest prime counting algorithm

https://github.com/zerafamik/Gold1
2•mikzerafa•31m ago•0 comments

Plausibly fastest prime sieving algorithm

https://github.com/zerafamik/Red2
2•mikzerafa•31m ago•0 comments

Show HN: Nace.ai Document Intelligence 1.0

https://www.nace.ai/developers
2•itomatik•33m ago•0 comments

The Olive Tree

https://worldsensorium.com/the-olive-tree/
2•dnetesn•34m ago•0 comments

The Pond Keeper's Problem

https://blue-continuum.com/the-pond-keepers-problem
3•dnetesn•35m ago•0 comments

Amazon's approach to data centers: community-focused, sustainable and efficient

https://www.aboutamazon.com/news/company-news/amazon-data-centers-built-together
3•healsdata•40m ago•0 comments

Show HN: I claude-coded in a few weeks what I wanted to build since 2023

https://www.getrequest.io/
1•santoshbaggam•40m ago•1 comments

One hundred reactions to 100+ solutions

https://proofsandprompts.com/2026/10/08/100-reactions-to-100-solutions/
3•ivansavz•48m ago•1 comments

Improving OpenAI's bound on the exact discrete Fourier transform below n log n

https://twitter.com/ryaneshea/status/2108239154572394772
5•shea256•48m ago•0 comments

Show HN: Agents can now create iOS Live Activities

https://twitter.com/kunalabcdani/status/2108353343089152106
3•kunal3•53m ago•0 comments

ADHD and autism at risk of over-diagnosis, says UK government review

https://www.bbc.com/news/articles/crkg7n1ypj24o
4•alephnerd•55m ago•0 comments

Using evals to cut AI errors 7x

https://hex.tech/blog/we-used-evals-to-improve-ai-feature/
2•izzymiller•55m ago•0 comments

Open d1: Edge decision models for text, vision, and audio

https://www.liquid.ai/blog/d1-open
6•gmays•57m ago•0 comments