Max execution time
Since pgcompact is used as a database maintenance tool, you usually have a limited time when you can do maintenance (e.g. when there is less db activity), so it would be really nice if you could define a max execution time which would limit how long pgcompact can run. For example --max-execution-time=3600 which would limit execution to 1 hour.
It makes sense. However, I guess it would be better to override SIGINT to stop pgcompact correctly, eg. wait for an ongoing query or process to finish, like the reindex one, instead of just breaking it in the middle, what might lead to unpleasant side effects like not dropped temporary indexes. So one could either safely Ctrl+C pgcompact or schedule kill <pid> or killall pgcompact on a particular time when the inactivity window ends for example (kill and killall use SIGINT by default). That would be more general and more flexible.
Thoughts?
I agree, that would be a much better option. We randomly encounter pgcompact temp tables and indices all the time, and they shouldn't exist.
On Tue, Mar 31, 2015, 03:24 Sergey Konoplev [email protected] wrote:
It makes sense. However, I guess it would be better to override SIGINT to stop pgcompact correctly, eg. wait for an ongoing query or process to finish, like the reindex one, instead of just breaking it in the middle, what might lead to unpleasant side effects like not dropped temporary indexes. So one could either safely Ctrl+C pgcompact or schedule kill
or killall pgcompact on a particular time when the inactivity window ends for example (kill and killall use SIGINT by default). That would be more general and more flexible. Thoughts?
— Reply to this email directly or view it on GitHub https://github.com/grayhemp/pgtoolkit/issues/7#issuecomment-87957721.
Putting it down to my TODO then.
BTW, pgcompact does not create temp tables, only indexes.
Yeah, sorry, you are correct, only indices.
On Tue, Mar 31, 2015, 11:58 Sergey Konoplev [email protected] wrote:
Putting it down to my TODO then.
BTW, pgcompact does not create temp tables, only indexes.
— Reply to this email directly or view it on GitHub https://github.com/grayhemp/pgtoolkit/issues/7#issuecomment-88120700.