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•10mo 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•10mo 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•10mo 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•10mo 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•10mo 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•10mo ago
Oh yes I agree with you. It may become a big push to convince my org to do that

OpenClaw gives users yet another reason to be freaked out about security

https://arstechnica.com/security/2026/04/heres-why-its-prudent-for-openclaw-users-to-assume-compr...
1•joozio•1m ago•0 comments

Apple at 50, blind people and our allies shaping Apple accessibility innovation

https://nfb.org/resources/publications-and-media/access-on-podcast/apple-50-blind-people-and-our-...
1•sholladay•2m ago•1 comments

ClickHouse Timeline Open-Source: detailed timeline about queries in ClickHouse

https://github.com/Slach/clickhouse-timeline/
1•eummm•5m ago•0 comments

Show HN: Anos – a hand-written ~100KiB microkernel for x86-64 and RISC-V

https://github.com/roscopeco/anos
1•noone_youknow•5m ago•0 comments

The Web Is an Antitrust Wedge

https://infrequently.org/2026/04/the-web-is-an-antitrust-wedge/
2•genericlemon24•9m ago•0 comments

GitHub Watch

https://rohanadwankar.github.io/github_watch/
2•jonbaer•13m ago•0 comments

Musk asks SpaceX IPO banks to buy Grok AI subscriptions, NYT reports

https://finance.yahoo.com/markets/stocks/articles/musk-asks-spacex-ipo-banks-181543226.html
2•alex_suzuki•18m ago•0 comments

How to take down a US F-35 over Iran? Chinese engineer's prophetic tutorial

https://www.scmp.com/news/china/science/article/3348619/how-take-down-us-f-35-over-iran-chinese-e...
2•sixhobbits•23m ago•0 comments

Show HN: RemembrallMCP – code dependency graph for agents and memory

https://github.com/cdnsteve/remembrallmcp
2•cdnsteve•24m ago•0 comments

Sheets Spreadsheets in Your Terminal

https://github.com/maaslalani/sheets
2•_____k•29m ago•0 comments

Archaeologists discover wreck of Danish warship sunk by Nelson 225 years ago

https://www.theguardian.com/science/2026/apr/02/archaeologists-discover-wreck-danish-warship-sunk...
3•zeristor•29m ago•0 comments

Show HN: Design to Code

https://www.absl.design/
2•absolute7•31m ago•0 comments

FDA had already warned the self-proclaimed 'fastest growing company in history'

https://www.drugdiscoverytrends.com/the-new-york-times-spotlighted-medvi-the-fda-had-already-warn...
2•thm•32m ago•0 comments

Emotion concepts and their function in a large language model

https://www.anthropic.com/research/emotion-concepts-function
11•dnw•33m ago•0 comments

Show HN: Cursor Cmd+K like command generator for all terminals

https://github.com/64bit/commandOK
2•gigapotential•35m ago•0 comments

Anyone switch accounts for Claude Code, did you lose everything?

2•dpark2026•36m ago•0 comments

¡Haciendo Historia Celebrating PyCon US's First-Ever Spanish-Language Keynote

https://pycon.blogspot.com/2026/04/haciendo-historia-celebrating-pycon-uss.html
3•lumpa•51m ago•0 comments

Auralo: An nice new Radio App check it out

https://testflight.apple.com/join/mEtdrzZ5
2•marc0janssen•56m ago•2 comments

Trump fires Pam Bondi as US Attorney General

https://www.reuters.com/world/trump-fires-pam-bondi-us-attorney-general-cnn-fox-2026-04-02/
3•mgh2•1h ago•3 comments

AgentShift–One command migrates your OpenClaw agents to NemoClaw

https://agentshift.sh/
1•ogkranthi•1h ago•0 comments

Uber engineer alleges hostile 'boys club' culture, firing after cancer leave

https://archive.org/details/10127280
4•nickvec•1h ago•0 comments

Spath and Splan

https://sumato.ai/posts/2026-04-04-spath-and-splan.html
2•jasonmoo•1h ago•0 comments

Ask HN: Interactive Car Mechanics Guide?

2•id00•1h ago•0 comments

Scientists are working on "everything vaccines"

https://economist.com/science-and-technology/2026/04/01/scientists-are-working-on-everything-vacc...
8•andsoitis•1h ago•2 comments

Donald Knuth: Open Letter to Condoleezza Rice (2002)

https://www-cs-faculty.stanford.edu/~knuth/rice.html
6•car•1h ago•2 comments

100 Years of the Iron Ring

https://engineerscanada.ca/news-and-events/news/100-years-of-the-iron-ring-a-symbol-of-an-enginee...
2•jruohonen•1h ago•0 comments

Vibe coded a design tool for a client handover as a non-technical founder

https://www.ugh.design
3•jayantrao94•1h ago•1 comments

Video Friday: Digit Learns to Dance

https://spectrum.ieee.org/video-humanoid-dancing
3•jruohonen•1h ago•0 comments

AdGuard ad trackers What ad-based surveillance does to your traffic

https://adguard.com/en/blog/adguard-ad-tracker-report-2025.html
3•XzetaU8•1h ago•0 comments

Pale Blue Dot

https://en.wikipedia.org/wiki/Pale_Blue_Dot
4•thunderbong•1h ago•1 comments