I don't think nested commit is supported however you might want to put
logic in do-something-useful.sql into a stored procedure without commit and
your BIGGER task just calls this SP and commits at the end; you can run the
SP by itself to have transaction protected.
/Jason
On Tue, 7 Jul 2020 at 2
I read this
https://www.2ndquadrant.com/en/blog/evolution-fault-tolerance-postgresql-synchronous-commit/
But don't see why your primary would have more records than the standby?
If killall was issued before commit returned, that means the transaction
wasn't completed so yes you would lose records