Important notes:
Right now we grab a subtransaction on each record and immediately release it. This should be quite fast because we never convert to an actual transaction with xid's. This is because PG_CATCH() happens after the transaction has been aborted.
There are a few C syntax issues I expect to find and fix when getting this to compile but for a discussion piece, this is an ok point on the first commit.
Important notes: Right now we grab a subtransaction on each record and immediately release it. This should be quite fast because we never convert to an actual transaction with xid's. This is because PG_CATCH() happens after the transaction has been aborted.
There are a few C syntax issues I expect to find and fix when getting this to compile but for a discussion piece, this is an ok point on the first commit.