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

Migrating from Firestore to PostgreSQL

https://medium.com/@ValentinMouret/functionally-migrating-from-firestore-to-postgresql-64947b5dff0d
1•tosh•1m ago•0 comments

Tiny hackable CUDA language model implementation

https://github.com/markusheimerl/gpt
1•markusheimerl•1m ago•0 comments

Musician BERNTH's 1.5M-sub YouTube channel demonetized over missed physical mail [video]

https://www.youtube.com/watch?v=uXwGHSPfBp4
1•TrackerFF•3m ago•1 comments

Neocities Down

https://status.neocitiesops.net/
1•e12e•3m ago•0 comments

Multimember Districts? Ranked Choice? This Is How to Fix Our Elections

https://www.nytimes.com/2026/06/04/opinion/voting-gerrymandering-election.html
1•marojejian•4m ago•1 comments

Postgres Serials Should Be BIGINT

https://www.crunchydata.com/blog/postgres-serials-should-be-bigint-and-how-to-migrate
1•tosh•7m ago•0 comments

The 1N4148: The Signal Diode That Ended Up Everywhere

https://www.allaboutcircuits.com/news/the-1n4148-the-signal-diode-that-ended-up-everywhere/
1•tomclancy•9m ago•0 comments

Show HN: MimicScribe – transcriber with ~97% accurate on-device speaker IDing

https://mimicscribe.app/
2•marshalla•10m ago•0 comments

Software security in 2026 – Practical tips for the mildly paranoid

https://www.dedoimedo.com/computers/internet-security-2026.html
1•speckx•16m ago•0 comments

Sakana AI's Recursive Self-Improvement (RSI) Lab

https://sakana.ai/rsi-lab/
2•hardmaru•16m ago•0 comments

Runcap, I built a local cost cap for coding agents

https://github.com/kirder24-code/ai-agent-manager
1•kirillAIsolo•16m ago•1 comments

Firebase SQL Connect

https://firebase.google.com/docs/sql-connect
1•tosh•17m ago•0 comments

Agents Need a Public Square

https://substack.com/@srulyrosenblat/p-200664261
1•srulyrosenblat•18m ago•0 comments

Waymo's Growing Pains – KQED Forum (Live)

https://www.kqed.org/forum/2010101914030/waymos-growing-pains
1•aanet•24m ago•1 comments

The token bill comes due

https://techcrunch.com/2026/06/05/the-token-bill-comes-due-inside-the-industry-scramble-to-manage...
1•amichae2•24m ago•0 comments

Show HN: Micron: a high performance C++23 (re)implementation of Libc and the STL

https://github.com/rfgplk/micron.cpp
2•rfgplk•28m ago•0 comments

Heat Therapy: Targeting Health, Disease, and Disability

https://onlinelibrary.wiley.com/doi/10.1002/cph4.70089
1•PaulHoule•29m ago•0 comments

Symbolica 2.0: Programmable Symbols for Python and Rust

https://symbolica.io/posts/symbolica_2_0_release/
2•mmastrac•29m ago•0 comments

Microsoft's Project Solara is an Android OS designed for agents instead of apps

https://arstechnica.com/gadgets/2026/06/microsofts-project-solara-is-an-android-os-designed-for-a...
1•e12e•31m ago•0 comments

The destruction of 3D printing: Bloomberg is behind it [video]

https://www.youtube.com/watch?v=E1B2cWEaWDw
4•CharlesW•31m ago•2 comments

Anthropic proposes a global slowdown of AI development

https://www.engadget.com/2188066/anthropic-proposes-global-ai-development-slowdown/
4•oogali•32m ago•1 comments

OpenAI on AWS: When to Use the API, Bedrock, or Managed Agents

https://eliza.com/blog/openai-on-aws-when-to-use-the-api-bedrock-or-managed-agents
1•mooreds•33m ago•0 comments

Show HN: SnapToCode – Screenshot any UI and get clean Tailwind code

https://chromewebstore.google.com/detail/snaptocode/jpchamlmjfoccmkdoiaibbpgkidapcnk
2•adithagrawaal•38m ago•0 comments

Claude Code, no need to worry about sunk costs anymore

https://www.npmjs.com/package/schwabe
3•schwabenschwabe•38m ago•2 comments

The Download: AI hacking beyond Mythos, and chatbots' impact on our brains

https://www.technologyreview.com/2026/06/05/1138452/the-download-ai-hacking-mythos-chatbots-brain...
1•joozio•41m ago•0 comments

Americans on GLP-1s Are Overwhelming Retailers with Their Nonstop Returns

https://www.wsj.com/business/retail/americans-on-glp-1s-are-overwhelming-retailers-with-their-non...
3•satvikpendem•42m ago•1 comments

Fake Money Built America

https://mail.blockworks.com/p/how-fake-money-built-america
3•speckx•43m ago•0 comments

Adyen Selected as Payment Services Provider for GOV.UK Pay

https://www.adyen.com/press-and-media/adyen-payments-gov-uk
11•ChrisArchitect•43m ago•2 comments

The Orchard Bug and the Unfolding Cybersecurity Reckoning

https://bengoertzel.substack.com/p/the-orchard-bug-and-the-unfolding
5•Ariarule•45m ago•0 comments

SVG of a Hamster Playing Table-Tennis

https://aibenchy.com/ro/showcase/hamster-playing-table-tennis-svg/
9•XCSme•46m ago•3 comments