Love the detail and approach here, though (and it is mentioned in the bottom of the article) this shouldn't be used at any very large scale... the estimate of at about 1k transactions per second or less seems about right. For any larger scale you want to look at something like pg_audit which can scale much much further and be used with other extensions to ensure you have a full audit log that can't be modified (when dealing with compliance).