Log In - Home Page

Patch: Cancel query if the connection is lost

Edit Patch - Move To Another CommitFest - Delete Patch

CommitFest 2011-11
Topic Logging, Monitoring & Error Handling
Patch Status Committed
Author Florian Pflug
Reviewers Greg Jaskiewicz, Heikki Linnakangas
Committer Heikki Linnakangas
Close Date 2011-12-09
Comments
Patch by fgp on 2011-10-17 01:46:39 PM: Initial version.
Comment by fgp on 2011-10-17 01:49:29 PM: Originally meant to prevent a walsender process from lingering indefinitely if archive_mode=on but no archive_command is set (or fails indefinitely) and pg_basebackup is cancelled while it waits for pg_stop_backup() to suceed. The patch is more general than that, though, and cancelles any query if the client connection vanishes. That detection only works if we actually attempt to send something, e.g. a NOTICE, though.
Comment by gregj on 2011-10-19 03:39:46 PM: So I looked at the patch, and first thing that pops out, is lack of the volatile keyword before the ClientConnectionLostPending variable is defined.

I haven't tested the code, just reviewed the patch itself.

Add Comment

Please log in to comment on this patch.