Skip to content

Improve cleanup/error handling #17

Description

@schmiddy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions