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

Avoid cancel and terminate backends #76

Closed
jirihlinka opened this issue Mar 3, 2016 · 4 comments
Closed

Avoid cancel and terminate backends #76

jirihlinka opened this issue Mar 3, 2016 · 4 comments

Comments

@jirihlinka
Copy link

Hello,

as I can't afford to happen pg_cancel_backend() or pg_terminate_backend() on a production DB (which could come up if pg_repack is waiting for --wait-timeout for its lock on repacked table), is it completly safe (in not running cancel/terminate way) to run pg_repack as follows?

timeout -s SIGINT 180s pg_repack --host=myhost --username=pgrepack_user --dbname=mydb --table=my table --wait-timeout=360

The point is:

  • the pg_repack process will get SIGINT in 180 seconds
  • wait-timeout is set to twice the 180 seconds (or just set it to high enough number of seconds, ie. 999999)
    ...therefore the wait-timeout should never happen and pg_repack should never send pg_cancel_backend() and pg_terminate_backend() - is it right?

Update: could it be possible to add an option for pg_repack to run it in "do not harm anyone" mode - avoiding running pg_cancel/terminate_backend() and after a wait_timeout it just rollback its changes and exit?

Thanks for help,
Jiri

@MichaelDBA
Copy link
Collaborator

Is this already implemented now in 1.3.4?

@MichaelDBA
Copy link
Collaborator

See also closed issue, 90

@jirihlinka
Copy link
Author

@MichaelDBA : Thanks for pointing me at Your issue #90. As of changelog for 1.3.4 there is not implemented the requested feature. For simplicity of issue tracking we can close this issue (as duplicity of #90) and continue in #90 as you requested the same funcionality (with better description :-)).

Regards,
Jiri

@MichaelDBA
Copy link
Collaborator

Issue 90 is also closed out, so is this feature implemented in pg_repack now? If so, what version will it be released in?

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

No branches or pull requests

2 participants