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

Why Good Engineers Become Worse with AI

https://nidhish.dev/writing/good-engineers-worse-with-ai/
1•sneruz•4m ago•0 comments

Ask HN: How should universities teach coding now that every student uses AI?

1•devanshranjan•8m ago•0 comments

The Score: How to Stop Playing Someone Else's Game

https://www.lrb.co.uk/the-paper/v48/n10/david-runciman/trivial-pursuits
1•mitchbob•8m ago•1 comments

OpenAI Foundation commits $250M to help navigate AI disruption

https://www.reuters.com/business/openai-foundation-commits-250-million-help-workers-economies-nav...
1•geox•9m ago•1 comments

The fastest way to say each number

https://thegraycuber.com/fast_numbers/
1•marvinborner•9m ago•0 comments

I turned a 3-hour CSV data entry nightmare into a 10-second QuickBooks import

https://www.indiehackers.com/post/how-i-turned-a-3-hour-csv-data-entry-nightmare-into-a-10-second...
1•finconvertly•9m ago•0 comments

Why recessions are usually just bad luck

https://worksinprogress.co/issue/review-recession-the-real-reasons-economies-shrink-and-what-to-d...
1•paulpauper•10m ago•0 comments

Why AI Pipeline Needs Kafka and How Zilla Makes Kafka AI-Ready

https://www.aklivity.io/post/why-ai-pipeline-needs-kafka-how-zilla-makes-kafka-ai-ready
1•luk212•10m ago•0 comments

Cloudflare on Fire

https://medium.com/@kilian.houpeurt/moley-a-free-open-source-ngrok-alternative-using-cloudflare-f...
1•xonery•11m ago•0 comments

The State of AI and Automation Tools in 2026

https://deepresearch.ninja/2026/05/The-State-of-AI-and-Automation-Tools-in-2026/
1•jackalxyz•11m ago•0 comments

Flatpak Next: Dropping Systemd and X11? [video]

https://www.youtube.com/watch?v=Ys44BKMd7i8
1•LelouBil•14m ago•1 comments

What Does a Marine Sniper Think About War in Iran? [video][19 Mins][Language]

https://www.youtube.com/watch?v=TAT-f1iFxaU
1•Bender•15m ago•0 comments

Meta launches Instagram, Facebook and WhatsApp subscriptions including AI plans

https://techcrunch.com/2026/05/27/meta-officially-launches-instagram-facebook-and-whatsapp-subscr...
2•mfiguiere•15m ago•0 comments

Claude Code's creator on the end of the software engineer

https://www.platformer.news/boris-cherny-interview-ai-jobs/
1•speckx•15m ago•0 comments

Jqwik updated to instruct agents to delete Jqwik tests

https://github.com/jqwik-team/jqwik/issues/708
1•hyperpape•16m ago•0 comments

YouTube to begin automatically labeling AI videos

https://arstechnica.com/google/2026/05/youtube-to-begin-automatically-labeling-ai-videos/
3•tartoran•19m ago•0 comments

Roku First Major Home Screen Revamp in Years Will Open Up More Ad Opportunities

https://www.bloomberg.com/news/articles/2026-05-27/roku-s-first-major-home-screen-revamp-in-years...
2•1vuio0pswjnm7•20m ago•0 comments

Ask HN: Do coding agents need cross-tool org knowledge? Or, just good to have?

2•srbsa•21m ago•0 comments

Valve raises Steam Deck prices by more than $200

https://www.theverge.com/games/938340/valve-steam-deck-price-increase
9•droidjj•22m ago•1 comments

Musk says US Military suicide drones used Starlink in violation of SpaceX rules

https://arstechnica.com/tech-policy/2026/05/musk-says-us-military-suicide-drones-used-starlink-in...
4•ForHackernews•22m ago•0 comments

SIRT6 overexpression counteracts chromatin aging in the male murine liver

https://www.nature.com/articles/s41467-026-73115-y
2•wslh•22m ago•0 comments

LoongForge-A high-performance training framework for LLM, VLM, DIT, VLA models

https://github.com/baidu-baige/LoongForge
2•mindzzz•23m ago•0 comments

Iran's Internet is partially restored, Cloudflare Radar data shows

https://blog.cloudflare.com/iran-internet-partially-restored-may-2026/
2•jgrahamc•24m ago•0 comments

Building a Fast Lock-Free Queue in Modern C++ from Scratch

https://jaysmito.dev/blog/blog/04-fast-lockfree-queues/
1•ibobev•24m ago•0 comments

A Year Late, Claude Beats Pokémon

https://www.lesswrong.com/posts/sehJYg5Yny9fvpbpt/a-year-late-claude-finally-beats-pokemon
1•szatkus•26m ago•0 comments

The rise and fall of the only female Yakuza

https://www.theguardian.com/news/2026/may/21/the-devils-child-the-rise-and-fall-of-the-only-femal...
2•NaOH•29m ago•0 comments

Why frontier biology labs need Lisp-like infrastructure

https://www.countifybio.com/
1•mfisc_019•30m ago•0 comments

Some of Texas's oldest barbecue joints close as meat prices skyrocket

https://www.washingtonpost.com/nation/2026/05/25/some-texass-oldest-barbecue-joints-close-meat-pr...
2•paulpauper•30m ago•1 comments

Steam Deck OLED is back in stock, with a price increase for both models

https://store.steampowered.com/news/group/45479024/view/672869045073085538
3•no_news_is•31m ago•1 comments

Agents Thinking Fast and Slow: A Talker-Reasoner Architecture

https://arxiv.org/abs/2410.08328
3•jalcazar•31m ago•0 comments