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

From Rockets to Heat Pumps

https://www.heatpumped.org/p/from-rockets-to-heat-pumps
1•ssuds•39s ago•0 comments

The Fate of Empires and Search for Survival (1978) [pdf]

https://people.uncw.edu/kozloffm/glubb.pdf
1•measurablefunc•1m ago•0 comments

Surprising emergent behavior of sorting algorithms – Michael Levin [video]

https://www.youtube.com/watch?v=jr1sNYY2t9A
1•duck•3m ago•0 comments

Extra Instructions of the 65XX Series CPU

http://www.ffd2.com/fridge/docs/6502-NMOS.extra.opcodes
1•embedding-shape•3m ago•0 comments

In 1995, a Netscape employee wrote a hack in 10 days that now runs the Internet

https://arstechnica.com/gadgets/2025/12/in-1995-a-netscape-employee-wrote-a-hack-in-10-days-that-...
2•hackthemack•3m ago•0 comments

US spending on new data centers is set to outpace spending on new office space

https://twitter.com/michael_nielsen/status/1997079657557131635
1•delichon•10m ago•2 comments

World Map of Emergencies

https://rsoe-edis.org/eventMap
1•bookofjoe•10m ago•0 comments

Show HN: Tranzia – Safety-Scored Routes for NYC and London Using Real Crime Data

https://tranzia.vercel.app
1•mednosis•11m ago•0 comments

DNS over TLS with LetsEncrypt

https://blog.hardill.me.uk/2025/12/06/dns-over-tls-with-letsencrypt/
1•8organicbits•11m ago•0 comments

Sam Altman's Dirty DRAM Deal

https://www.mooreslawisdead.com/post/sam-altman-s-dirty-dram-deal
4•pabs3•17m ago•1 comments

Staying ahead of censors in 2025: Fighting censorship in Iran and Russia

https://blog.torproject.org/staying-ahead-of-censors-2025/
1•pabs3•18m ago•0 comments

ClipNotebook, a simple notebook that turns links into clear visual playlists

https://clipnotebook.com/
1•aiipassword•19m ago•1 comments

Loss of trust in women leaders concern

https://www.removepaywall.com/search?url=https://www.bloomberg.com/news/articles/2025-12-05/why-p...
1•DaveZale•20m ago•0 comments

Show HN: AcquireMock – Self-hosted mock payment gateway for testing

https://github.com/illusiOxd/acquiremock
1•ashfromsky•20m ago•0 comments

Blazing-Fast Magic Beans [video]

https://www.youtube.com/watch?v=AqKFBEvwqqg
1•lawrenceyan•29m ago•0 comments

Neuro-Symbolic Architecture Using Thermodynamic Refinement-Free Energy Principle

https://zenodo.org/records/17834542
1•Doug_Bitterbot•31m ago•1 comments

Differential Geometry: Paths on a Sphere

https://foundational.site/differential-geometry-part-i-the-surface-of-a-sphere/
2•yonitate•33m ago•0 comments

Voice AI to book more SaaS demos that doesn't cost an arm

https://www.sabato.ai/saas
2•maschera•34m ago•1 comments

Supra Aeon Story with Agda Proof and Provisional Appendix

https://github.com/GoodRoyal/SupraAeonAgdaStory-Patent
2•IndigoBlack•41m ago•0 comments

Auto optimization of Claude.md with prompt learning

https://arize.com/blog/claude-md-best-practices-learned-from-optimizing-claude-code-with-prompt-l...
2•SteveMorin•42m ago•0 comments

It appears Meta may be ready to put the metaverse out of its misery

https://www.cnn.com/2025/12/04/business/meta-metaverse-stock-nightcap
8•methuselah_in•47m ago•4 comments

Thought Experiment: Measuring the Circumference of the Earth from a Bedroom

3•richardjennings•50m ago•1 comments

Nvidia CUDA Tile

https://developer.nvidia.com/cuda/tile
1•apples2apples•50m ago•0 comments

Cloudflare says it has fended off 416B AI bot scrape requests in 5 months

https://www.tomshardware.com/tech-industry/big-tech/cloudflare-says-it-has-fended-off-416-billion...
4•ghssds•51m ago•0 comments

Phones might get pricier next year. Thank the AI boom

https://www.cnn.com/2025/12/05/tech/memory-shortage-phone-computer-prices
4•Bender•52m ago•0 comments

SteamOS vs. Windows on dedicated GPUs: It's complicated, but Windows has an edge

https://arstechnica.com/gadgets/2025/12/steamos-vs-windows-on-dedicated-gpus-its-complicated-but-...
1•Bender•54m ago•0 comments

The NPU in your phone keeps improving–why isn't that making AI better?

https://arstechnica.com/gadgets/2025/12/the-npu-in-your-phone-keeps-improving-why-isnt-that-makin...
2•Bender•54m ago•0 comments

Nonprofits on HCB

https://hackclub.com/fiscal-sponsorship/directory/
1•nullbyte808•57m ago•0 comments

Oldest attestation of Austronesian language: Đông Yên Châu inscription

https://en.wikipedia.org/wiki/%C4%90%C3%B4ng_Y%C3%AAn_Ch%C3%A2u_inscription
1•teleforce•1h ago•0 comments

Please recommend CRM for small hardware startup

2•dmytroKh•1h ago•0 comments