The KeyboardInterrupt exception doesn't get raised if the script
is stuck in a blocking call, i.e., inside the check_event function.
So pressing CTRL+C has no effect.
This patch disables the exception, reverting to the OS' default
behaviour for the SIGINT signal (i.e., terminate the program).
The main script currently hangs if any loader fails to connect to
the database. This happens because connection exceptions from
PGLoader._postinit are not handled, and the main script keeps
waiting for "finished" events that never happen.
This patch ensures that exceptions in the loader threads are noted
by the main script, and that an appropriate exit status is returned
to the OS.
Changes in pgloader/pgloader.py:
- Handle all exceptions in PGLoader.run
- Add a boolean "success" flag to PGLoader class that determines
whether any errors occured within that object's main thread
- Whenever an exception happens within a thread, set the "success"
flag to false and call "terminate"
Changes in pgloader.py:
- check "success" flag on all threads after they finish
- return 0 on success and 1 on any error
- the script no longer returns the result of "print_summary",
just 0 or 1.
* User Defined Columns
* Temporary files with copy data content now suffixed .pgloader
* New option --version
* Fix TextReader newline_escapes configuration option reading
* Fix Reader reject initialisation
* Skip database related settings when in DRY_RUN mode (-n)
* List all command line options from man page synopsis
* new developpers
* python code replaces tcl code
* one config file for many tables (one command line for loading them all)
* manpage
* debian package
* supports multi-line input file (without quotes)
* Informix large objects support (loading to TEXT or BYTEA)
* configurable amount of rows per COPY instruction
* trailing slash optionnal removal (support informix UNLOAD file format)
* begin processing at any line in the file, by number or row id
* dry-run option, to validate input reading without connecting to database
* pedantic option, to stop processing on warning