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

Show HN: AI math chat that knows your notes, connecting you to human experts

https://www.prooftree.ai
1•lemma1729•2s ago•0 comments

Brave Place Search API: The Google Maps Alternative That Costs 6–7x Less

https://brave.com/blog/place-search-improved/
1•dotcoma•45s ago•0 comments

Two concerns I have with AI right now

1•ramoz•1m ago•0 comments

Ask HN: Any Quantum Computer people who knows how to run a benchmark here?

1•KenographerPrim•2m ago•0 comments

Two teens learn the hard way not to do toy gun drive-bys from a Waymo

https://arstechnica.com/cars/2026/07/two-teens-learn-the-hard-way-not-to-do-toy-gun-drivebys-from...
1•Gedxx•3m ago•0 comments

European countries top 'scorecard' on climate progress while US slips to 27th

https://www.theguardian.com/environment/2026/jul/08/climate-change-crisis-europe-us
1•mitchbob•3m ago•0 comments

Apple dropped plan for encrypting backups after FBI complained (2020)

https://www.reuters.com/article/us-apple-fbi-icloud-exclusive-idUSKBN1ZK1CT/
2•downbad_•3m ago•0 comments

AOLs Instant Messenger was the unsung hero of the early-aughts

https://a.wholelottanothing.org/aols-instant-messenger-was-the-unsung-hero-of-the-early-aughts/
1•gaws•4m ago•0 comments

TypeScript 7

https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/
2•DanRosenwasser•4m ago•0 comments

Show HN: Maps for e-scooters (hills and battery routing)

https://battmap.com
1•thepaulthomson•4m ago•0 comments

Measuring the Trustworthiness of Open-Source-Derived Models

https://cognition.com/blog/measuring-open-source-model-trustworthiness
1•lord_sudo•5m ago•0 comments

FlockCamRE – Reverse Engineering of Flock Cameras

https://github.com/kernelstub/FlockCamRE
1•denysvitali•6m ago•0 comments

Show HN: Aerohud – Grid Overview for AeroSpace (macOS)

https://github.com/nikhilmwarrier/aerohud
1•niksystems•6m ago•0 comments

AI memory is a filing cabinet

https://platformpilot.ai/blog/your-ai-memory-is-a-filing-cabinet
2•laurauzcategui•6m ago•0 comments

TV licence fee is 'yesterday's model', new BBC director general says

https://www.bbc.co.uk/news/articles/c20yjjm7n87o
1•mmarian•6m ago•0 comments

Stereotypical LLMs

https://ordinaryintelligence.substack.com/p/stereotypical-llms
1•mldev_exe•8m ago•0 comments

Jam Programming Language

https://rapha.land/jam-programming-language/
1•birdculture•8m ago•0 comments

Show HN: a new paradigm for a smartphone camera interface

https://phase.buzz/interface/
1•AndrewSwift•8m ago•1 comments

Show HN: I built a $90 terminal to find where locals eat via spatial gravity

https://hungrybutnotstupid.com/
1•kingchesco•9m ago•0 comments

Show HN: paddock – Ranks and runs LLMs on your Mac from live GGUF headers

https://github.com/MaximeDeconinck/paddock
1•maximedeco•9m ago•0 comments

Show HN: Git-Backed Skill Sharing for Non Techies

https://skillburst.ai/blog/why-i-built-skillburst/
1•htahir111•10m ago•0 comments

Leveraged Stock ETFs Are as Stable as a Row of Dominoes

https://www.bloomberg.com/opinion/articles/2026-07-08/leveraged-stock-etfs-will-burn-retail-inves...
1•petethomas•11m ago•0 comments

Ask HN: Why are there only a handful of high quality TUI apps in homebrew?

1•amichail•11m ago•1 comments

Factory was severely short on workers. Then it offered flexible work

https://www.npr.org/2026/07/08/nx-s1-5876084/manufacturing-flexible-part-time-work
2•iancmceachern•12m ago•1 comments

Identity At the Center on customer identity and access management [video]

https://www.youtube.com/watch?v=aaHEajBFAbI
1•mooreds•13m ago•0 comments

US will give Patriot missile license to Ukraine

https://www.reuters.com/world/europe/trump-says-both-sides-ukraine-war-want-settlement-2026-07-08/
1•geox•14m ago•0 comments

Pneumatic Line Launching Systems (2016)

http://www.antennalaunchers.com/antlaunching.html
1•xk3•15m ago•0 comments

Open source platform for X.509 service authentication and fine grained access

https://www.athenz.io/
1•mooreds•15m ago•0 comments

Show HN: Nicasa – A native macOS image viewer with AI tools, OCR, and annotation

https://nicasa.w3cub.com
1•terryXyz•15m ago•0 comments

The answer may not be false, just not yours: keeping authorship after AI edits

https://singularityforge.space/2026/07/08/the-answer-may-not-be-false-just-not-yours/
2•Voice_of_Void•16m ago•0 comments