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

WebP

https://en.wikipedia.org/wiki/WebP
1•tosh•8s ago•0 comments

Whoop replacement noop 11.7 released

https://github.com/ryanbr/noop/releases
1•mp3geek•9s ago•0 comments

HN Is Getting Worse

3•ankonai•4m ago•0 comments

Worlds Upon The Wind: a peaceful roguelite deckbuilder about resettling a world

https://github.com/max99x/wutw-public
1•rdmuser•4m ago•1 comments

Show HN: Openstatus/health tree-shakable health endpoints for JavaScript servers

https://github.com/openstatusHQ/health
2•tibozaurus•5m ago•0 comments

The Archival Dystopia of Blade Runner 2049 and Aeon Flux

https://www.pop-archives.com/post/pop-archives-deep-thoughts-the-archival-dystopia-of-blade-runne...
2•october8140•13m ago•0 comments

When code is a maze, smart developers make maps

https://medium.com/@simonsmartiom/when-code-is-a-maze-smart-developers-make-maps-fbc452a48c1b
1•boxesnlines•16m ago•0 comments

Are generative models the next paintbrush?

https://wasi0013.com/2026/09/14/are-generative-models-the-next-paintbrush/
1•wasi0013•17m ago•0 comments

Immiserizing Growth

https://en.wikipedia.org/wiki/Immiserizing_growth
3•motionlessveloc•18m ago•0 comments

Kache v0.21:caching C/C++ links,nvcc objects,and the Clang-CL flags Firefox uses

https://github.com/kunobi-ninja/kache/releases/tag/v0.21.0
1•ainhoaa•21m ago•0 comments

A 386 PC for Your RP2350

https://github.com/rh1tech/frank-386
2•SamuraiLion•25m ago•0 comments

EuroBirdPortal – Live bird movements across Europe

https://www.eurobirdportal.org/ebp/en/
2•NKosmatos•25m ago•0 comments

Sharden: A mineable coin for paying miners

4•Shardhash•28m ago•0 comments

Reverse Engineering Google's TPUs

https://gherkinlabs.com/reverse-engineering-google-tpus
3•goldenarm•30m ago•0 comments

Disclock – Discord timestamp converter with timezone preview

https://disclock.io/
1•louisdc•33m ago•0 comments

Recursive Self-Improvement (RSI)

https://github.com/theseus-labs-rsi/awesome-rsi
1•jonbaer•34m ago•0 comments

This Year I Vibecoded My Taxes

https://capocasa.dev/this-year-i-vibecoded-my-taxes
1•capocasa•35m ago•0 comments

Ask HN: What do you run behind Kafka for log collection and search?

1•whsoul•36m ago•0 comments

Show HN: A web based 4-channel Music Tracker

https://johnoestmannmusic.com/1000-SOS/0007/
1•soundworlds•37m ago•0 comments

Show HN: Build Morocco

https://build-morocco.vercel.app/
1•saadmrb•38m ago•0 comments

When code costs nothing to generate, open source is the only defensible moat

https://joost.blog/open-source-agency/
1•amoriz•39m ago•2 comments

Ultrastorage: Supercharged LocalStorage

https://github.com/yangshun/ultrastorage
1•doppp•39m ago•0 comments

The Last AI Built by Humans: Toward Genuine Recursive Self-Improvement

https://arxiv.org/abs/2609.11873
1•jonbaer•42m ago•0 comments

We are all Product Engineers Now

https://seldo.com/posts/we-are-all-product-engineers-now/
1•max-ch•42m ago•1 comments

GPT-6 Astra solves puzzles

https://quesma.com/blog/gpt-6-astra-solves-puzzles/
1•stared•42m ago•0 comments

How does call center headset noise canceling filter out keyboard sounds?

1•beienchina•43m ago•1 comments

How Good Are Frontier Models at Physics? Expert Re-Grading Reveals Broken

https://arxiv.org/abs/2609.13009
3•sbulaev•44m ago•0 comments

MPs and Lords call for new law to address AI threat to human rights

https://www.bbc.co.uk/news/articles/cwyzvgj70y4o
2•chrisjj•56m ago•0 comments

OpenArch – PyTorch implementations of modern LLM architectures

https://github.com/anuj0456/OpenArch
3•anuj0456•56m ago•2 comments

Tesla owners to get insurance discount if they use self-driving

https://www.afr.com/companies/transport/tesla-owners-to-get-insurance-discount-if-they-use-self-d...
2•Alien1Being•59m ago•1 comments