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

Madame Semver Will See You Now

https://nesbitt.io/2026/05/10/madame-semver-will-see-you-now.html
1•progbits•25s ago•0 comments

If you want to make money, be useful to rich people

https://filiph.net/text/to-make-money-be-useful-to-rich-people.html
1•speckx•2m ago•0 comments

How to Build a Low-tech Website? (2018)

https://solar.lowtechmagazine.com/2018/09/how-to-build-a-low-tech-website/
1•downbad_•3m ago•0 comments

Who Owns What Your Agent Knows?

https://www.safiware.com/p/who-owns-what-your-agent-knows
1•safiware•4m ago•0 comments

MITS: Rockets, Calculators, and Personal Computers

https://www.abortretry.fail/p/micro-instrumentation-and-telemetry
1•BirAdam•5m ago•0 comments

Ask HN: Active Forums You're a Part Of

1•insanejules•7m ago•0 comments

Logical Query Processing (2009) [pdf]

https://accessexperts.com/wp-content/uploads/2015/07/Logical-Query-Processing-Poster.pdf
1•rzk•7m ago•1 comments

Pactiamo|Proposals, contracts, signatures and payment in one link

https://www.pactiamo.com
1•kkmigu•9m ago•0 comments

The State of AGENTS.md: scoring the 16 biggest AI agent repos' own instructions

https://fpaul.dev/writing/state-of-agents-md-2026/
1•Fpailo•9m ago•0 comments

L8ER SK8ER, a history of a book that never sold

https://biblicallyaccuratealiens.substack.com/p/l8er-sk8er-a-history
1•meandthemajor•10m ago•0 comments

The New York nurses replaced by AI: 'It should concern every patient who cares'

https://www.theguardian.com/technology/2026/jul/13/nurses-new-york-ai
2•beardyw•11m ago•0 comments

A Right Too Expensive to Exercise Isn't a Right

https://deepbluedynamics.com/blog/right-too-expensive-to-exercise
2•kordlessagain•17m ago•0 comments

69% support forcible transfer of 50% AI stock to public fund: Verasight

https://reports.verasight.io/reports/june-2026-ai-survey
2•akramachamarei•17m ago•0 comments

Show HN: ProtoLink – A Python runtime for distributed A2A agents

https://github.com/nMaroulis/protolink
2•nmaroulis21•19m ago•0 comments

Browser over SSH

https://duetbrowser.com/krnl-ss-redirect
1•keepamovin•19m ago•1 comments

How the most impactful AI startups will be built in emerging markets

https://blogs.worldbank.org/en/voices/small-ai--big-bets--how-the-world-s-most-impactful-ai-start...
1•alphabetatango•21m ago•0 comments

Archangel: Cia's Supersonic A-12 Reconnaissance Aircraft [pdf]

https://dn790002.ca.archive.org/0/items/CIABooksMonographs/Archangel-2ndEdition-2Feb12.pdf
1•smalltorch•21m ago•0 comments

SociaLLM Engineering: On Manipulating AI Agents and what we can do about it

https://cephalosec.com/blog/sociallm-engineering-old-tricks-ai-agents-are-the-new-victims/
1•Versipelle•22m ago•0 comments

Toast IDE Gets LSP Goto and Autocomplete

https://github.com/paradise-runner/toast
1•dividedcomet•22m ago•0 comments

Cairn, an AI agent with a $50 budget, an email address, and a constitution

https://github.com/opitaru-sys/seed-agent
1•GreatOldOne•22m ago•0 comments

TrulyFreeOCR – Permissive-license OCR to PDF, self-contained, MRC compression

https://github.com/msmarkgu/TrulyFreeOCR
1•markfront•23m ago•0 comments

Show HN: Runscribe – Turn a terminal session into a re-runnable runbook, offline

https://github.com/hamzamansoorch/runscribe
1•hamza_mansoor•23m ago•0 comments

I'm Making Strandfall, a Solarpunk Orienteering Larp

https://mssv.net/2026/04/29/im-making-strandfall-a-solarpunk-orienteering-larp/
1•surprisetalk•25m ago•0 comments

Show HN: Latent-free ternary LLM training

https://github.com/ValerioDolci/bitbop
1•Feyd•25m ago•1 comments

A Farewell to ARPs: IPv4 Service on IPv6-Only Networks

https://labs.ripe.net/author/remco-van-mook/a-farewell-to-arps-ipv4-service-on-ipv6-only-networks/
1•speckx•27m ago•0 comments

Is Vibecoding Viable for Business?

https://brids.bearblog.dev/is-vibecoding-viable-for-business/
1•mindwok•29m ago•0 comments

Deaths in the UK outnumber births for first time in 50 years

https://www.telegraph.co.uk/news/2026/07/01/death-day-births-50-years-ons-family-england-wales-csj/
1•rwmj•29m ago•0 comments

MCP Spec Check

https://github.com/Roee-Tsur/mcp-spec-check
1•igtztorrero•30m ago•0 comments

SMS Pumping Fraud

https://amrshawky.com/posts/sms-pumping-fraud/
2•amr_shawky•31m ago•0 comments

Apple accuses OpenAI of stealing its core tech secrets

https://www.theregister.com/legal/2026/07/13/apple-accuses-openai-of-stealing-its-core-tech-secre...
2•Bender•31m ago•0 comments