A few gripes with our current error handling:
- pgut_atexit_push() is called relatively late (after step 1 is complete), which is probably OK with current git master, but is a bit dodgy for the concurrent-ddl-guard changes
- Instead of calling ROLLBACK unconditionally, we should use pgut_rollback() which checks PQtransactionStatus(conn)
- Instead of using printf() plus exit() for reporting fatal error messages, an elog or ereport ... ERROR seems more appropriate
- Errors encountered in reorg_one_table(), e.g. for conflicted triggers, shouldn't be treated as fatal -- pg_reorg might be operating on a whole database, and should be able to continue processing other tables
A few gripes with our current error handling: