Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max execution time #7

Open
kustodian opened this issue Mar 13, 2015 · 4 comments
Open

Max execution time #7

kustodian opened this issue Mar 13, 2015 · 4 comments

Comments

@kustodian
Copy link

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.

@grayhemp
Copy link
Owner

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?

@kustodian
Copy link
Author

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
#7 (comment).

@grayhemp
Copy link
Owner

Putting it down to my TODO then.

BTW, pgcompact does not create temp tables, only indexes.

@kustodian
Copy link
Author

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
#7 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants