Skip to content

Commit 00ddb1e

Browse files
schmiddydvarrazzo
authored andcommitted
Improved error handling, particularly when processing multiple tables.
Previously, an error while processing any single table would cause pg_reorg to cause exit() and bail out. Quick summary of fixes: * get rid of pgut_atexit_push() and pgut_atexit_pop() use, since we are no longer relying on calling exit() to handle mundane errors * remove lock_conn_pid variable; we can just use buffer instead * lock_exclusive() and lock_access_share() now return bool instead of bailing out on any error * ERROR-level ereport() or elog() calls now return WARNING instead, to avoid bailing out unnecessarily * signature of reorg_cleanup() changed; it no longer needs to take a void pointer * check return of strdup() for vxid * Use pgut_rollback() instead of sending ROLLBACK; command directly There are still one or two FIXMEs left, including fixing table name escaping, but I'm committing this much.
1 parent ad75dcf commit 00ddb1e

File tree

1 file changed

+121
-77
lines changed

1 file changed

+121
-77
lines changed

0 commit comments

Comments
 (0)