ielizaga / gpcheckintegrity

Greenplum integrity check on tables, schemas and databases
MIT License
4 stars 0 forks source link

Implementation of signal handlers #17

Open Zerpet opened 8 years ago

Zerpet commented 8 years ago

This issue tracks the development of signal handlers for gpcheckintegrity. The program should handle signals gracefully. At the moment, it prints the stack trace and exits, which is not very user friendly.

The main handlers should be:

  1. SIGTERM should stop things gracefully and close connections, then do a clean exit.
  2. SIGINT should stop things gracefully, close connections and ignore subsequent signals of this kinds (use case of ctrl-c storm)
  3. Other signals like SIGQUIT and SIGABRT should behave the same as point 1
ielizaga commented 3 years ago

Greenplum 6.X includes the very old python 2.7:

[gpadmin@localhost ~]$ which python
/usr/local/greenplum-db-6.16.3/ext/python/bin/python
[gpadmin@localhost ~]$ python --version
Python 2.7.12

Can likely leverage the Signal python library to do this. https://docs.python.org/2.7/library/signal.html