frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Download cash counter and help me

https://play.google.com/store/apps/details?id=com.logicforge.bdcash&hl=en_US
1•bdcashcounter•53s ago•0 comments

Turn HAR Files, Claude Code, Copilot CLI, and Codex CLI Logs into ATIF

https://github.com/waldekmastykarz/atifact
1•waldekm•1m ago•0 comments

Show HN: Sidekick – The zot coding agent, one click away on macOS

https://github.com/patriceckhart/zot-sidekick
7•patriceckhart•2m ago•0 comments

How much did OpenAI pay for Tomoro?

https://www.aienablementinsider.com/p/how-much-did-openai-pay-for-tomoro
1•dylancollins•4m ago•0 comments

I Found the US Nuclear Detection System in Space (GPS)

https://www.youtube.com/watch?v=DjLnIb41DuQ
1•valeg•5m ago•0 comments

You can now use your Gmail account in Proton Mail

https://proton.me/blog/proton-mail-connect-gmail
3•Topfi•6m ago•0 comments

Integer Overflow in Postgres

https://www.crunchydata.com/blog/the-integer-at-the-end-of-the-universe-integer-overflow-in-postgres
1•tosh•7m ago•0 comments

AI coding agents use your technology

https://developer.microsoft.com/blog/how-ai-coding-agents-actually-use-your-technology
1•waldekm•8m ago•0 comments

The AX stack: what's fixed, where you can win

https://developer.microsoft.com/blog/the-ax-stack-whats-fixed-where-you-can-win
1•waldekm•8m ago•0 comments

New version of "peers" – the AI couple doing things

https://github.com/c0decave/peers
1•dash0r•17m ago•0 comments

Bitcoin back above $61,000 after rout leads to $1.6B liquidations

https://www.coindesk.com/markets/2026/06/06/bitcoin-back-above-usd61-000-after-rout-leads-to-usd1...
3•Varun-Sakhuja•22m ago•0 comments

Bitrig – The best way to build native Swift apps with AI

https://bitrig.com
1•Austin_Conlon•24m ago•0 comments

Are AI chatbots making us lose control of our brains?

https://www.technologyreview.com/2026/06/05/1138427/are-ai-chatbots-making-us-lose-control-of-our...
1•joozio•24m ago•0 comments

Adaptive Low-Rank Transformer with Dynamic Expert Routing for Continual Learning

https://zenodo.org/records/20064618
1•jballanc•29m ago•0 comments

Show HN: Summarize YT Video by pasting url into AI chat

https://www.youtube.com/watch?v=BblwmuFhhOI
1•julienreszka•35m ago•1 comments

39C3: The art of text rendering (Nicolas Rougier)

1•signa11•39m ago•0 comments

Ask HN: For non-hackers/nerds, why do you read HN?

2•throwaway2037•40m ago•2 comments

Reversible Computing

https://en.wikipedia.org/wiki/Reversible_computing
1•peter_d_sherman•44m ago•0 comments

Mega-cap IPOs: Implications for institutional investors and index managers

https://www.ssga.com/nl/en_gb/institutional/insights/mega-cap-ipos-implications-for-institutional...
1•akg_67•44m ago•0 comments

How do non-green plants work? (2013)

https://plantsandprejudice.wordpress.com/2013/08/07/how-do-non-green-plants-work/
1•downbad_•45m ago•0 comments

Canada bans Texas cattle over flesh-eating screwworm outbreak in US

https://www.bbc.com/news/articles/cevpv3r7jmpo
4•1659447091•45m ago•1 comments

List of Quantum Logic Gates

https://en.wikipedia.org/wiki/List_of_quantum_logic_gates
1•peter_d_sherman•47m ago•0 comments

Ethnic nepotism and bias in Seattle tech industry

https://old.reddit.com/r/SeattleWA/comments/1ty5xsm/ethnic_nepotism_and_bias_in_seattle_tech_indu...
4•866-RON-0-FEZ•53m ago•1 comments

Ask HN: What would you name your own LLM?

2•akashwadhwani35•54m ago•2 comments

FakeCall: An Open Source App to simulate incoming calls on Android

https://github.com/DDOneApps/FakeCall
1•thunderbong•55m ago•0 comments

Industry Coalition Letter on Memory Shortage

https://tiaonline.org/policy/industry-coalition-letter-on-memory-shortage/
1•T-A•58m ago•0 comments

A Starbucks marketing stunt spiralled into mass boycotts in South Korea

https://www.theguardian.com/world/2026/jun/06/starbucks-south-korea-tank-day-promotion-blunder
3•beardyw•58m ago•1 comments

PostgreSQL 19 Beta 1 Released

https://www.postgresql.org/about/news/postgresql-19-beta-1-released-3313/
1•molf•1h ago•0 comments

Recommended Mystery Novels

https://bactra.org/notebooks/mystery-recs.html
2•mattbit•1h ago•0 comments

Running Python code in a sandbox with MicroPython and WASM

https://simonwillison.net/2026/Jun/6/micropython-in-a-sandbox/
3•pretext•1h ago•0 comments