This post was originally published on ashwch.com.
Learn how pghistory.context works and some of its gotchas that we faced at Diversio (thanks to Amal Raj B R who identified the issue), and how we adjusted our approach to avoid saving context metadata that is not relevant to the current business logic but is being carried over from a parent context.