diff --git a/web/migrations/versions/b5b87fdfcb30_.py b/web/migrations/versions/b5b87fdfcb30_.py
new file mode 100644
index 0000000..ca2da07
--- /dev/null
+++ b/web/migrations/versions/b5b87fdfcb30_.py
@@ -0,0 +1,33 @@
+##########################################################################
+#
+# pgAdmin 4 - PostgreSQL Tools
+#
+# Copyright (C) 2013 - 2018, The pgAdmin Development Team
+# This software is released under the PostgreSQL Licence
+#
+##########################################################################
+
+"""Added state of the utility process
+
+Revision ID: b5b87fdfcb30
+Revises: ece2e76bf60e
+Create Date: 2018-10-24 12:37:59.487969
+
+"""
+from pgadmin.model import db
+
+# revision identifiers, used by Alembic.
+revision = 'b5b87fdfcb30'
+down_revision = 'ece2e76bf60e'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+    db.engine.execute(
+        'ALTER TABLE process ADD COLUMN process_state INTEGER DEFAULT 0'
+    )
+
+
+def downgrade():
+    pass
diff --git a/web/pgadmin/misc/bgprocess/processes.py b/web/pgadmin/misc/bgprocess/processes.py
index a8856f8..470232c 100644
--- a/web/pgadmin/misc/bgprocess/processes.py
+++ b/web/pgadmin/misc/bgprocess/processes.py
@@ -113,6 +113,8 @@ class BatchProcess(object):
         self.etime = p.end_time
         # Exit code
         self.ecode = p.exit_code
+        # Process State
+        self.process_state = p.process_state
 
     def _create_process(self, _desc, _cmd, _args):
         ctime = get_current_time(format='%y%m%d%H%M%S%f')
@@ -166,6 +168,8 @@ class BatchProcess(object):
         self.etime = None
         # Exit code
         self.ecode = None
+        # Process State
+        self.process_state = 0
 
         # Arguments
         self.args = _args
@@ -393,7 +397,16 @@ class BatchProcess(object):
             p.start_time = p.end_time = get_current_time()
             if not p.exit_code:
                 p.exit_code = self.ecode
+            p.process_state = 2
             db.session.commit()
+        else:
+            # Update the process state to "Started"
+            p = Process.query.filter_by(
+                pid=self.id, user_id=current_user.id
+            ).first()
+            p.process_state = 1
+            db.session.commit()
+
 
     def status(self, out=0, err=0):
         import re
@@ -480,7 +493,8 @@ class BatchProcess(object):
             return {
                 'start_time': self.stime,
                 'exit_code': self.ecode,
-                'execution_time': execution_time
+                'execution_time': execution_time,
+                'process_state': self.process_state
             }
 
         return {
@@ -496,7 +510,8 @@ class BatchProcess(object):
             },
             'start_time': self.stime,
             'exit_code': self.ecode,
-            'execution_time': execution_time
+            'execution_time': execution_time,
+            'process_state': self.process_state
         }
 
     @staticmethod
@@ -597,7 +612,8 @@ class BatchProcess(object):
                 'etime': p.end_time,
                 'exit_code': p.exit_code,
                 'acknowledge': p.acknowledge,
-                'execution_time': execution_time
+                'execution_time': execution_time,
+                'process_state': p.process_state
             })
 
         if changed:
@@ -679,6 +695,9 @@ class BatchProcess(object):
         try:
             process = psutil.Process(p.utility_pid)
             process.terminate()
+            # Update the process state to "Terminated"
+            p.process_state = 3
+            db.session.commit()
         except psutil.Error as e:
             current_app.logger.warning(
                 _("Unable to kill the background process '{0}'").format(
diff --git a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
index c88cc55..a959bef 100644
--- a/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
+++ b/web/pgadmin/misc/bgprocess/static/js/bgprocess.js
@@ -29,7 +29,7 @@ define('misc.bgprocess', [
           details: false,
           notify: (_.isUndefined(notify) || notify),
           curr_status: null,
-          state: 0, // 0: NOT Started, 1: Started, 2: Finished
+          state: 0, // 0: NOT Started, 1: Started, 2: Finished, 3: Terminated
           completed: false,
 
           id: info['id'],
@@ -124,6 +124,9 @@ define('misc.bgprocess', [
         if ('exit_code' in data)
           self.exit_code = data.exit_code;
 
+        if ('process_state' in data)
+          self.state = data.process_state
+
         if ('out' in data) {
           self.out = data.out && data.out.pos;
 
@@ -183,7 +186,9 @@ define('misc.bgprocess', [
           }
 
           if (!_.isNull(self.exit_code)) {
-            if (self.exit_code == 0) {
+            if (self.state === 3) {
+              self.curr_status = gettext('Terminated by user.');
+            } else if (self.exit_code == 0) {
               self.curr_status = gettext('Successfully completed.');
             } else {
               self.curr_status = S(
@@ -349,18 +354,19 @@ define('misc.bgprocess', [
             self.curr_status
           );
 
-          if (self.exit_code === 0) {
-            $status_bar.addClass('bg-success');
-          } else if (self.exit_code == 1) {
-            $status_bar.addClass('bg-failed');
-          }
-
           // Enable/Disable stop process button
           var $btn_stop_process = $(self.container.find('.bg-process-stop'));
           if (isNaN(parseInt(self.exit_code))) {
-            $btn_stop_process.removeClass('disabled');
+            $btn_stop_process.attr('disabled', false);
           } else {
-            $btn_stop_process.addClass('disabled');
+            $btn_stop_process.attr('disabled', true);
+            if (self.exit_code === 0 && self.state != 3) {
+              $status_bar.addClass('bg-success');
+              $status_bar.removeClass('bg-failed');
+            } else {
+              $status_bar.addClass('bg-failed');
+              $status_bar.removeClass('bg-success');
+            }
           }
         } else {
           self.show_detailed_view.apply(self);
@@ -382,11 +388,7 @@ define('misc.bgprocess', [
         }
 
         var container = panel.$container,
-          status_class = (
-            (self.exit_code === 0) ?
-            'bg-bgprocess-success' : (self.exit_code == 1) ?
-            'bg-bgprocess-failed' : ''
-          ),
+          status_class = '',
           $logs = container.find('.bg-process-watcher'),
           $header = container.find('.bg-process-details'),
           $footer = container.find('.bg-process-footer'),
@@ -394,9 +396,14 @@ define('misc.bgprocess', [
 
         // Enable/Disable stop process button
         if (isNaN(parseInt(self.exit_code))) {
-          $btn_stop_process.removeClass('disabled');
+          $btn_stop_process.attr('disabled', false);
         } else {
-          $btn_stop_process.addClass('disabled');
+          $btn_stop_process.attr('disabled', true);
+          if (self.exit_code === 0 && self.state != 3) {
+            status_class = 'bg-bgprocess-success';
+          } else {
+            status_class = 'bg-bgprocess-failed'
+          }
         }
 
         // On Click event to stop the process.
@@ -483,6 +490,8 @@ define('misc.bgprocess', [
 
       stop_process: function() {
         var self = this;
+        // Set the state to terminated.
+        self.state = 3;
         $.ajax({
           type: 'PUT',
           timeout: 30000,
diff --git a/web/pgadmin/model/__init__.py b/web/pgadmin/model/__init__.py
index 57a6360..db71217 100644
--- a/web/pgadmin/model/__init__.py
+++ b/web/pgadmin/model/__init__.py
@@ -29,7 +29,7 @@ from flask_sqlalchemy import SQLAlchemy
 #
 ##########################################################################
 
-SCHEMA_VERSION = 20
+SCHEMA_VERSION = 21
 
 ##########################################################################
 #
@@ -259,6 +259,7 @@ class Process(db.Model):
     exit_code = db.Column(db.Integer(), nullable=True)
     acknowledge = db.Column(db.String(), nullable=True)
     utility_pid = db.Column(db.Integer, nullable=False)
+    process_state = db.Column(db.Integer, nullable=False)
 
 
 class Keys(db.Model):
