diff --git a/docs/en_US/images/table_parameter.png b/docs/en_US/images/table_parameter.png
old mode 100755
new mode 100644
index 6ad16c10f9a8948ed8e9a49fadbd4825e2c2b2d9..b8399f6a0197e0efa83b889f9c5f617af65caf0a
GIT binary patch
diff --git a/docs/en_US/table_dialog.rst b/docs/en_US/table_dialog.rst
index abb009649..02401da33 100644
--- a/docs/en_US/table_dialog.rst
+++ b/docs/en_US/table_dialog.rst
@@ -485,10 +485,10 @@ thresholds; use the *Table* tab and the *Toast Table* tab to customize values
 for the table and the associated toast table:
 
 * Move the *Custom auto-vacuum?* switch to the *Yes* position to perform custom
-  maintenance on the table.
-* Move the *Enabled?* switch to the *Yes* position to select values in the
+  maintenance on the table and to select values in the
   *Vacuum table*. The *Vacuum Table* provides default values for maintenance
   operations.
+* Changing *Autovacuum enabled?* to *Not set* will reset autovacuum_enabled.
 
 Provide a custom value in the *Value* column for each metric listed in the
 *Label* column.
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
index 084e4cd9e..f606e384f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
@@ -88,7 +88,9 @@ define('pgadmin.node.schema', [
 
         var gridHeader = _.template([
             '<div class="subnode-header">',
-            '  <span class="control-label col-sm-4"><%-label%></span>',
+            '<% if (label && label != "") %> {',
+            '    <span class="control-label col-sm-4"><%-label%></span>',
+            '}',
             '</div>'].join('\n')),
           gridBody = $('<div class="pgadmin-control-group backgrid form-group col-12 object subnode"></div>').append(
             gridHeader(attributes)
@@ -151,7 +153,8 @@ define('pgadmin.node.schema', [
   },{
     id: 'autovacuum_custom', label: gettext('Custom auto-vacuum?'),
     group: gettext('Table'), mode: ['edit', 'create'],
-    type: 'switch',
+    type: 'switch', controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
+    controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
     disabled: function(m) {
       // If table is partitioned table then disabled it.
       if (m.top && m.top.get('is_partitioned')) {
@@ -169,45 +172,29 @@ define('pgadmin.node.schema', [
       return true;
     },
   },{
-    id: 'autovacuum_enabled', label: gettext('Enabled?'),
+    id: 'autovacuum_enabled', label: gettext('Autovacuum Enabled?'),
     group: gettext('Table'), mode: ['edit', 'create'],
-    type: 'switch',
+    type: 'radioModern', controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
+    controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
+    options: [
+      {'label': gettext('Not set'), 'value': 'x'},
+      {'label': gettext('Yes'), 'value': 't'},
+      {'label': gettext('No'), 'value': 'f'},
+    ],
     deps: ['autovacuum_custom'],
     disabled: function(m) {
       if(!m.top.inSchema.apply(this, [m]) &&
         m.get('autovacuum_custom') == true) {
 
-        // If reloptions is null then set the autovacuum_enabled to true.
-        if (!_.isUndefined(m.get('reloptions')) &&
-          _.isNull(m.get('reloptions'))) {
-          setTimeout(function() {
-            m.set('autovacuum_enabled', true);
-          }, 10);
-        }
         return false;
       }
 
       // We also need to unset rest of all
       setTimeout(function() {
-        m.set('autovacuum_enabled', false);
+        m.set('autovacuum_enabled', 'x');
       }, 10);
       return true;
     },
-    control: Backform.SwitchControl.extend({
-      onChange: function() {
-        Backform.SwitchControl.prototype.onChange.apply(this, arguments);
-        let m = this.model;
-        // If value of autovacuum_enabled is false and reloptions is null
-        // then we should set the value of autovacuum_custom to false, as
-        // there is no query to run.
-        if (!m.get('autovacuum_enabled') && !_.isUndefined(m.get('reloptions'))
-          && _.isNull(m.get('reloptions'))) {
-          setTimeout(function() {
-            m.set('autovacuum_custom', false);
-          }, 10);
-        }
-      },
-    }),
   },{
     id: 'vacuum_table', label: '',
     model: Backform.VacuumTableModel, editable: false, type: 'collection',
@@ -224,7 +211,7 @@ define('pgadmin.node.schema', [
           name: 'value', label: gettext('Value'),
           cellHeaderClasses:'width_percent_30',
           cellFunction: Backform.cellFunction, editable: function(m) {
-            return m.handler.get('autovacuum_enabled');
+            return m.handler.get('autovacuum_custom');
           }, headerCell: Backgrid.Extension.CustomHeaderCell,
         },
         {
@@ -235,13 +222,14 @@ define('pgadmin.node.schema', [
         },
       ],
     }),
-    deps: ['autovacuum_enabled'],
+    deps: ['autovacuum_custom'],
   },{
     id: 'spacer_ctrl', group: gettext('TOAST table'), mode: ['edit', 'create'], type: 'spacer',
   },{
     id: 'toast_autovacuum', label: gettext('Custom auto-vacuum?'),
     group: gettext('TOAST table'), mode: ['edit', 'create'],
-    type: 'switch',
+    type: 'switch', controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
+    controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
     disabled: function(m) {
       // We need to check additional condition to toggle enable/disable
       // for table auto-vacuum
@@ -255,50 +243,32 @@ define('pgadmin.node.schema', [
       return true;
     },
   },{
-    id: 'toast_autovacuum_enabled', label: gettext('Enabled?'),
+    id: 'toast_autovacuum_enabled', label: gettext('Autovacuum Enabled?'),
     group: gettext('TOAST table'), mode: ['edit', 'create'],
-    type: 'switch',
+    type: 'radioModern', controlLabelClassName: 'control-label pg-el-sm-4 pg-el-12',
+    controlsClassName: 'pgadmin-controls pg-el-sm-8 pg-el-12',
+    options: [
+      {'label': gettext('Not set'), 'value': 'x'},
+      {'label': gettext('Yes'), 'value': 't'},
+      {'label': gettext('No'), 'value': 'f'},
+    ],
     deps:['toast_autovacuum'],
     disabled: function(m) {
       // If in schema & in create mode then enable it
       if(!m.top.inSchema.apply(this, [m]) &&
           m.get('toast_autovacuum') === true) {
 
-        // If reloptions is null then set the autovacuum_enabled to true.
-        if (!_.isUndefined(m.get('toast_reloptions')) &&
-          _.isNull(m.get('toast_reloptions'))) {
-          setTimeout(function() {
-            m.set('toast_autovacuum_enabled', true);
-          }, 10);
-        }
-
         return false;
       }
 
       if (m.isNew() || m.get('hastoasttable')) {
         // we also need to unset rest of all
         setTimeout(function() {
-          m.set('toast_autovacuum_enabled', false);
+          m.set('toast_autovacuum_enabled', 'x');
         }, 10);
       }
       return true;
     },
-    control: Backform.SwitchControl.extend({
-      onChange: function() {
-        Backform.SwitchControl.prototype.onChange.apply(this, arguments);
-
-        let m = this.model;
-        // If value of autovacuum_enabled is false and reloptions is null
-        // then we should set the value of autovacuum_custom to false, as
-        // there is no query to run.
-        if (!m.get('toast_autovacuum_enabled') && !_.isUndefined(m.get('toast_reloptions'))
-          && _.isNull(m.get('toast_reloptions'))) {
-          setTimeout(function() {
-            m.set('toast_autovacuum', false);
-          }, 10);
-        }
-      },
-    }),
   },{
     id: 'vacuum_toast', label: '',
     model: Backform.VacuumTableModel, type: 'collection', editable: function(m) {
@@ -318,7 +288,7 @@ define('pgadmin.node.schema', [
           cellHeaderClasses:'width_percent_30',
           headerCell: Backgrid.Extension.CustomHeaderCell,
           cellFunction: Backform.cellFunction, editable: function(m) {
-            return m.handler.get('toast_autovacuum_enabled');
+            return m.handler.get('toast_autovacuum');
           },
         },
         {
@@ -329,7 +299,7 @@ define('pgadmin.node.schema', [
         },
       ],
     }),
-    deps: ['toast_autovacuum_enabled'],
+    deps: ['toast_autovacuum'],
   }];
 
   // Extend the browser's collection class for schema collection
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py
index 03073e277..68b945c56 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/__init__.py
@@ -619,6 +619,42 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings,
             return False, gone(
                 gettext("The specified table could not be found."))
 
+        # Set value based on
+        # x: No set, t: true, f: false
+        res['rows'][0]['autovacuum_enabled'] = 'x' \
+            if res['rows'][0]['autovacuum_enabled'] is None else \
+            {True: 't', False: 'f'}[res['rows'][0]['autovacuum_enabled']]
+
+        res['rows'][0]['toast_autovacuum_enabled'] = 'x' \
+            if res['rows'][0]['toast_autovacuum_enabled'] is None else \
+            {True: 't', False: 'f'}[res['rows'][0]['toast_autovacuum_enabled']]
+
+        # Enable custom autovaccum only if one of the options is set
+        # or autovacuum is set
+        res['rows'][0]['autovacuum_custom'] = any([
+            res['rows'][0]['autovacuum_vacuum_threshold'],
+            res['rows'][0]['autovacuum_vacuum_scale_factor'],
+            res['rows'][0]['autovacuum_analyze_threshold'],
+            res['rows'][0]['autovacuum_analyze_scale_factor'],
+            res['rows'][0]['autovacuum_vacuum_cost_delay'],
+            res['rows'][0]['autovacuum_vacuum_cost_limit'],
+            res['rows'][0]['autovacuum_freeze_min_age'],
+            res['rows'][0]['autovacuum_freeze_max_age'],
+            res['rows'][0]['autovacuum_freeze_table_age']]) \
+            or res['rows'][0]['autovacuum_enabled'] in ('t', 'f')
+
+        res['rows'][0]['toast_autovacuum'] = any([
+            res['rows'][0]['toast_autovacuum_vacuum_threshold'],
+            res['rows'][0]['toast_autovacuum_vacuum_scale_factor'],
+            res['rows'][0]['toast_autovacuum_analyze_threshold'],
+            res['rows'][0]['toast_autovacuum_analyze_scale_factor'],
+            res['rows'][0]['toast_autovacuum_vacuum_cost_delay'],
+            res['rows'][0]['toast_autovacuum_vacuum_cost_limit'],
+            res['rows'][0]['toast_autovacuum_freeze_min_age'],
+            res['rows'][0]['toast_autovacuum_freeze_max_age'],
+            res['rows'][0]['toast_autovacuum_freeze_table_age']]) \
+            or res['rows'][0]['toast_autovacuum_enabled'] in ('t', 'f')
+
         # We will check the threshold set by user before executing
         # the query because that can cause performance issues
         # with large result set
@@ -943,6 +979,11 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings,
                 data['partition_scheme'] = self.get_partition_scheme(data)
                 partitions_sql = self.get_partitions_sql(data)
 
+            # Update the vacuum table settings.
+            BaseTableView.update_vacuum_settings(self, 'vacuum_table', data)
+            # Update the vacuum toast table settings.
+            BaseTableView.update_vacuum_settings(self, 'vacuum_toast', data)
+
             SQL = render_template(
                 "/".join([self.table_template_path, 'create.sql']),
                 data=data, conn=self.conn
@@ -1023,14 +1064,9 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings,
                 data[k] = v
 
         try:
-            SQL = render_template(
-                "/".join([self.table_template_path, 'properties.sql']),
-                did=did, scid=scid, tid=tid,
-                datlastsysoid=self.datlastsysoid
-            )
-            status, res = self.conn.execute_dict(SQL)
+            status, res = self._fetch_properties(did, scid, tid)
             if not status:
-                return internal_server_error(errormsg=res)
+                return res
 
             return super(TableView, self).update(
                 gid, sid, did, scid, tid, data, res)
@@ -1266,14 +1302,9 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings,
         res = None
 
         if tid is not None:
-            SQL = render_template(
-                "/".join([self.table_template_path, 'properties.sql']),
-                did=did, scid=scid, tid=tid,
-                datlastsysoid=self.datlastsysoid
-            )
-            status, res = self.conn.execute_dict(SQL)
+            status, res = self._fetch_properties(did, scid, tid)
             if not status:
-                return internal_server_error(errormsg=SQL)
+                return res
 
         SQL, name = self.get_sql(did, scid, tid, data, res)
         SQL = re.sub('\n{2,}', '\n\n', SQL)
@@ -1335,17 +1366,9 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings,
         """
         main_sql = []
 
-        SQL = render_template(
-            "/".join([self.table_template_path, 'properties.sql']),
-            did=did, scid=scid, tid=tid,
-            datlastsysoid=self.datlastsysoid
-        )
-        status, res = self.conn.execute_dict(SQL)
+        status, res = self._fetch_properties(did, scid, tid)
         if not status:
-            return internal_server_error(errormsg=res)
-
-        if len(res['rows']) == 0:
-            return gone(gettext("The specified table could not be found."))
+            return res
 
         data = res['rows'][0]
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/static/js/partition.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/static/js/partition.js
index 9ce744cfa..68b2209a8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/static/js/partition.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/static/js/partition.js
@@ -330,8 +330,8 @@ function(
           is_sys_table: undefined,
           coll_inherits: [],
           hastoasttable: true,
-          toast_autovacuum_enabled: false,
-          autovacuum_enabled: false,
+          toast_autovacuum_enabled: 'x',
+          autovacuum_enabled: 'x',
           primary_key: [],
           partitions: [],
           partition_type: 'range',
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js
index d65957132..9dd206fe7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.js
@@ -300,8 +300,8 @@ define('pgadmin.node.table', [
           is_sys_table: undefined,
           coll_inherits: [],
           hastoasttable: true,
-          toast_autovacuum_enabled: false,
-          autovacuum_enabled: false,
+          toast_autovacuum_enabled: 'x',
+          autovacuum_enabled: 'x',
           primary_key: [],
           partitions: [],
           partition_type: 'range',
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/gpdb/5_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/gpdb/5_plus/properties.sql
index 10daab06f..c3d4ff606 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/gpdb/5_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/gpdb/5_plus/properties.sql
@@ -58,8 +58,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
     -- Added for pgAdmin4
-	(CASE WHEN array_length(rel.reloptions, 1) > 0 THEN true ELSE false END) AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
 	NULL AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 	-- Added for partition table
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/properties.sql
index daa102f5a..ade77adcd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/properties.sql
@@ -54,10 +54,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-    -- Added for pgAdmin4
-	(CASE WHEN array_length(rel.reloptions, 1) > 0 THEN true ELSE false END) AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 	-- Added for partition table
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql
index 56a06c8a9..e8dca8fb6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql
@@ -54,10 +54,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-    -- Added for pgAdmin4
-	(CASE WHEN array_length(rel.reloptions, 1) > 0 THEN true ELSE false END) AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 	-- Added for partition table
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/properties.sql
index daa102f5a..ade77adcd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/properties.sql
@@ -54,10 +54,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-    -- Added for pgAdmin4
-	(CASE WHEN array_length(rel.reloptions, 1) > 0 THEN true ELSE false END) AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 	-- Added for partition table
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql
index 56a06c8a9..e8dca8fb6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql
@@ -54,10 +54,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-    -- Added for pgAdmin4
-	(CASE WHEN array_length(rel.reloptions, 1) > 0 THEN true ELSE false END) AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 	-- Added for partition table
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/create.sql
index dafc87aa2..0e0fdd263 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/create.sql
@@ -78,15 +78,15 @@ CACHE {{c.seqcache|int}} {% endif %}
 WITH (
     OIDS = {% if data.relhasoids %}TRUE{% else %}FALSE{% endif %}{% if data.fillfactor %},
     FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.parallel_workers is defined and data.parallel_workers != '' and data.parallel_workers != None %},
-    parallel_workers = {{ data.parallel_workers }}{% endif %}{% if data.autovacuum_custom %},
-    autovacuum_enabled = {% if data.autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}{% endif %}{% if data.toast_autovacuum %},
-    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}
-{% endif %}{% if data.autovacuum_enabled and data.vacuum_table|length > 0 %}
-{% for opt in data.vacuum_table %}{% if opt.name and opt.value %}
+    parallel_workers = {{ data.parallel_workers }}{% endif %}{% if data.autovacuum_enabled in ('t', 'f') %},
+    autovacuum_enabled = {% if data.autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}{% endif %}{% if data.toast_autovacuum_enabled in ('t', 'f') %},
+    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}
+{% endif %}{% if data.autovacuum_custom and data.vacuum_table|length > 0 %}
+{% for opt in data.vacuum_table %}{% if opt.name and opt.value is defined %}
 ,
     {{opt.name}} = {{opt.value}}{% endif %}
-{% endfor %}{% endif %}{% if data.toast_autovacuum_enabled and data.vacuum_toast|length > 0 %}
-{% for opt in data.vacuum_toast %}{% if opt.name and opt.value %}
+{% endfor %}{% endif %}{% if data.toast_autovacuum and data.vacuum_toast|length > 0 %}
+{% for opt in data.vacuum_toast %}{% if opt.name and opt.value is defined %}
 ,
     toast.{{opt.name}} = {{opt.value}}{% endif %}
 {% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/properties.sql
index 3d31fe60e..1be4938ac 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/properties.sql
@@ -28,8 +28,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
 	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
 	substring(array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
-	(CASE WHEN (substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') = 'true')
-	  THEN true ELSE false END) AS autovacuum_enabled,
+	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
@@ -39,8 +38,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(CASE WHEN (substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') =  'true')
-	  THEN true ELSE false END) AS toast_autovacuum_enabled,
+	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
@@ -56,10 +54,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-    -- Added for pgAdmin4
-	(array_to_string(rel.reloptions, ',') like '%autovacuum%') AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 	-- Added for partition table
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/create.sql
index caec8f520..73717cd2d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/create.sql
@@ -79,15 +79,15 @@ WITH (
     OIDS = {% if data.relhasoids %}TRUE{% else %}FALSE{% endif %}{% if data.fillfactor %},
     FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.parallel_workers is defined and data.parallel_workers != '' and data.parallel_workers != None %},
     parallel_workers = {{ data.parallel_workers }}{% endif %}{% if data.toast_tuple_target is defined and data.toast_tuple_target != '' and data.toast_tuple_target != None %},
-    toast_tuple_target = {{ data.toast_tuple_target }}{% endif %}{% if data.autovacuum_custom %},
-    autovacuum_enabled = {% if data.autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}{% endif %}{% if data.toast_autovacuum %},
-    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}
-{% endif %}{% if data.autovacuum_enabled and data.vacuum_table|length > 0 %}
-{% for opt in data.vacuum_table %}{% if opt.name and opt.value %}
+    toast_tuple_target = {{ data.toast_tuple_target }}{% endif %}{% if data.autovacuum_enabled in ('t', 'f') %},
+    autovacuum_enabled = {% if data.autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}{% endif %}{% if data.toast_autovacuum_enabled in ('t', 'f') %},
+    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}
+{% endif %}{% if data.autovacuum_custom and data.vacuum_table|length > 0 %}
+{% for opt in data.vacuum_table %}{% if opt.name and opt.value is defined %}
 ,
     {{opt.name}} = {{opt.value}}{% endif %}
-{% endfor %}{% endif %}{% if data.toast_autovacuum_enabled and data.vacuum_toast|length > 0 %}
-{% for opt in data.vacuum_toast %}{% if opt.name and opt.value %}
+{% endfor %}{% endif %}{% if data.toast_autovacuum and data.vacuum_toast|length > 0 %}
+{% for opt in data.vacuum_toast %}{% if opt.name and opt.value is defined %}
 ,
     toast.{{opt.name}} = {{opt.value}}{% endif %}
 {% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/properties.sql
index 3ac7ceae8..caa928169 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/properties.sql
@@ -29,8 +29,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
 	substring(array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
 	substring(array_to_string(rel.reloptions, ',') FROM 'toast_tuple_target=([0-9]*)') AS toast_tuple_target,
-	(CASE WHEN (substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') = 'true')
-	  THEN true ELSE false END) AS autovacuum_enabled,
+	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
@@ -40,8 +39,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(CASE WHEN (substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') =  'true')
-	  THEN true ELSE false END) AS toast_autovacuum_enabled,
+	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
@@ -57,10 +55,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-    -- Added for pgAdmin4
-	(array_to_string(rel.reloptions, ',') like '%autovacuum%') AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 	-- Added for partition table
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/update.sql
index 0f27dbed2..d5b9d367c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/update.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/update.sql
@@ -115,14 +115,14 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
     autovacuum_freeze_table_age
 );
 {% else %}
-{% if data.autovacuum_enabled is defined or has_vacuum_set %}
+{% if (data.autovacuum_enabled in ('t', 'f') and data.autovacuum_enabled != o_data.autovacuum_enabled) or has_vacuum_set %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
-{% if data.autovacuum_enabled is defined and data.autovacuum_enabled != o_data.autovacuum_enabled %}
-    autovacuum_enabled = {% if data.autovacuum_enabled %}true{% else %}false{% endif %}{% if has_vacuum_set %},
+{% if data.autovacuum_enabled in ('t', 'f') and data.autovacuum_enabled != o_data.autovacuum_enabled %}
+    autovacuum_enabled = {% if data.autovacuum_enabled == 't' %}true{% else %}false{% endif %}{% if has_vacuum_set %},
 {% endif %}
 {% endif %}
 {% if has_vacuum_set %}
-{% for opt in data.vacuum_table.set_values %}{% if opt.name and opt.value %}
+{% for opt in data.vacuum_table.set_values %}{% if opt.name and opt.value is defined %}
     {{opt.name}} = {{opt.value}}{% if not loop.last %},
 {% endif %}
 {% endif %}
@@ -131,13 +131,19 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
 
 );
 {% endif %}
-{% if has_vacuum_reset %}
+{% if (data.autovacuum_enabled == 'x' and data.autovacuum_enabled != o_data.autovacuum_enabled) or has_vacuum_reset %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
+{% if data.autovacuum_enabled =='x' and data.autovacuum_enabled != o_data.autovacuum_enabled %}
+    autovacuum_enabled{% if has_vacuum_reset %},
+{% endif %}
+{% endif %}
+{% if has_vacuum_reset %}
 {% for opt in data.vacuum_table.reset_values %}{% if opt.name %}
     {{opt.name}}{% if not loop.last %},
 {% endif %}
 {% endif %}
 {% endfor %}
+{% endif %}
 
 );
 {% endif %}
@@ -165,14 +171,14 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
     toast.autovacuum_analyze_scale_factor
 );
 {% else %}
-{% if data.toast_autovacuum_enabled is defined or has_vacuum_toast_set %}
+{% if (data.toast_autovacuum_enabled in ('t', 'f') and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled) or has_vacuum_toast_set %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
-{% if data.toast_autovacuum_enabled is defined and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
-    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled %}true{% else %}false{% endif %}{% if has_vacuum_toast_set %},
+{% if data.toast_autovacuum_enabled in ('t', 'f') and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
+    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}true{% else %}false{% endif %}{% if has_vacuum_toast_set %},
 {% endif %}
 {% endif %}
 {% if has_vacuum_toast_set %}
-{% for opt in data.vacuum_toast.set_values %}{% if opt.name and opt.value %}
+{% for opt in data.vacuum_toast.set_values %}{% if opt.name and opt.value is defined %}
     toast.{{opt.name}} = {{opt.value}}{% if not loop.last %},
 {% endif %}
 {% endif %}
@@ -181,13 +187,19 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
 
 );
 {% endif %}
-{% if has_vacuum_toast_reset %}
+{% if (data.toast_autovacuum_enabled == 'x' and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled) or has_vacuum_toast_reset %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
+{% if data.toast_autovacuum_enabled == 'x' and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
+    toast.autovacuum_enabled{% if has_vacuum_toast_reset %},
+{% endif %}
+{% endif %}
+{% if has_vacuum_toast_reset %}
 {% for opt in data.vacuum_toast.reset_values %}{% if opt.name %}
     toast.{{opt.name}}{% if not loop.last %},
 {% endif %}
 {% endif %}
 {% endfor %}
+{% endif %}
 
 );
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/create.sql
index 486bc3091..79d5d74b6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/create.sql
@@ -17,7 +17,7 @@
 {% set empty_bracket = "\n(\n)"%}
 {% endif %}
 {% set with_clause = false%}
-{% if data.fillfactor or data.parallel_workers or data.toast_tuple_target or data.autovacuum_custom or data.autovacuum_enabled or data.toast_autovacuum or data.toast_autovacuum_enabled or (data.autovacuum_enabled and data.vacuum_table|length > 0) or (data.toast_autovacuum_enabled and data.vacuum_toast|length > 0) %}
+{% if data.fillfactor or data.parallel_workers or data.toast_tuple_target or data.autovacuum_custom or data.autovacuum_enabled in ('t', 'f') or data.toast_autovacuum or data.toast_autovacuum_enabled in ('t', 'f') %}
 {% set with_clause = true%}
 {% endif %}
 CREATE {% if data.relpersistence %}UNLOGGED {% endif %}TABLE {{conn|qtIdent(data.schema, data.name)}}{{empty_bracket}}
@@ -83,30 +83,31 @@ CACHE {{c.seqcache|int}} {% endif %}
 {% endif %}
 
 {% if with_clause %}
-{% set add_comma = false%}
+{% set ns = namespace(add_comma=false) %}
 WITH (
-{% if data.fillfactor %}{% set add_comma = true%}
+{% if data.fillfactor %}{% set ns.add_comma = true%}
     FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.parallel_workers %}
-{% if add_comma %},
-{% endif %}
-    parallel_workers = {{ data.parallel_workers }}{% set add_comma = true%}{% endif %}{% if data.toast_tuple_target %}
-{% if add_comma %},
-{% endif %}
-    toast_tuple_target = {{ data.toast_tuple_target }}{% set add_comma = true%}{% endif %}{% if data.autovacuum_custom %}
-{% if add_comma %},
-{% endif %}
-    autovacuum_enabled = {% if data.autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}{% set add_comma = true%}{% endif %}{% if data.toast_autovacuum %}
-{% if add_comma %},
-{% endif %}
-    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}
-{% endif %}{% if data.autovacuum_enabled and data.vacuum_table|length > 0 %}
-{% for opt in data.vacuum_table %}{% if opt.name and opt.value %}
-,
-    {{opt.name}} = {{opt.value}}{% endif %}
-{% endfor %}{% endif %}{% if data.toast_autovacuum_enabled and data.vacuum_toast|length > 0 %}
-{% for opt in data.vacuum_toast %}{% if opt.name and opt.value %}
-,
-    toast.{{opt.name}} = {{opt.value}}{% endif %}
+{% if ns.add_comma %},
+{% endif %}
+    parallel_workers = {{ data.parallel_workers }}{% set ns.add_comma = true%}{% endif %}{% if data.toast_tuple_target %}
+{% if ns.add_comma %},
+{% endif %}
+    toast_tuple_target = {{ data.toast_tuple_target }}{% set ns.add_comma = true%}{% endif %}{% if data.autovacuum_enabled in ('t', 'f') %}
+{% if ns.add_comma %},
+{% endif %}
+    autovacuum_enabled = {% if data.autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}{% set ns.add_comma = true%}{% endif %}{% if data.toast_autovacuum_enabled in ('t', 'f')  %}
+{% if ns.add_comma %},
+{% endif %}
+    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}{% set ns.add_comma = true%}{% endif %}{% if data.autovacuum_custom %}
+{% for opt in data.vacuum_table %}{% if opt.name and opt.value is defined %}
+{% if ns.add_comma %},
+{% endif %}
+    {{opt.name}} = {{opt.value}}{% set ns.add_comma = true%}{% endif %}
+{% endfor %}{% endif %}{% if data.toast_autovacuum %}
+{% for opt in data.vacuum_toast %}{% if opt.name and opt.value is defined %}
+{% if ns.add_comma %},
+{% endif %}
+    toast.{{opt.name}} = {{opt.value}}{% set ns.add_comma = true%}{% endif %}
 {% endfor %}{% endif %}
 
 {% if data.spcname %}){% else %});{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/properties.sql
index 3d9b1f622..0263d39b5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/properties.sql
@@ -29,8 +29,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
 	substring(array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
 	substring(array_to_string(rel.reloptions, ',') FROM 'toast_tuple_target=([0-9]*)') AS toast_tuple_target,
-	(CASE WHEN (substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') = 'true')
-	  THEN true ELSE false END) AS autovacuum_enabled,
+	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
@@ -40,8 +39,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(CASE WHEN (substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') =  'true')
-	  THEN true ELSE false END) AS toast_autovacuum_enabled,
+	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
@@ -57,10 +55,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-    -- Added for pgAdmin4
-	(array_to_string(rel.reloptions, ',') like '%autovacuum%') AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 	-- Added for partition table
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/update.sql
index e2415ad2a..b8b4da665 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/update.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/update.sql
@@ -51,7 +51,7 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
 
 {% endif %}
 {#####################################################}
-{## change fillfactore settings ##}
+{## change fillfactor settings ##}
 {#####################################################}
 {% if data.fillfactor and data.fillfactor != o_data.fillfactor %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
@@ -107,14 +107,14 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
     autovacuum_freeze_table_age
 );
 {% else %}
-{% if data.autovacuum_enabled is defined or has_vacuum_set %}
+{% if (data.autovacuum_enabled in ('t', 'f') and data.autovacuum_enabled != o_data.autovacuum_enabled) or has_vacuum_set %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
-{% if data.autovacuum_enabled is defined and data.autovacuum_enabled != o_data.autovacuum_enabled %}
-    autovacuum_enabled = {% if data.autovacuum_enabled %}true{% else %}false{% endif %}{% if has_vacuum_set %},
+{% if data.autovacuum_enabled in ('t', 'f') and data.autovacuum_enabled != o_data.autovacuum_enabled %}
+    autovacuum_enabled = {% if data.autovacuum_enabled == 't' %}true{% else %}false{% endif %}{% if has_vacuum_set %},
 {% endif %}
 {% endif %}
 {% if has_vacuum_set %}
-{% for opt in data.vacuum_table.set_values %}{% if opt.name and opt.value %}
+{% for opt in data.vacuum_table.set_values %}{% if opt.name and opt.value is defined %}
     {{opt.name}} = {{opt.value}}{% if not loop.last %},
 {% endif %}
 {% endif %}
@@ -123,13 +123,19 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
 
 );
 {% endif %}
-{% if has_vacuum_reset %}
+{% if (data.autovacuum_enabled == 'x' and data.autovacuum_enabled != o_data.autovacuum_enabled) or has_vacuum_reset %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
+{% if data.autovacuum_enabled =='x' and data.autovacuum_enabled != o_data.autovacuum_enabled %}
+    autovacuum_enabled{% if has_vacuum_reset %},
+{% endif %}
+{% endif %}
+{% if has_vacuum_reset %}
 {% for opt in data.vacuum_table.reset_values %}{% if opt.name %}
     {{opt.name}}{% if not loop.last %},
 {% endif %}
 {% endif %}
 {% endfor %}
+{% endif %}
 
 );
 {% endif %}
@@ -157,14 +163,14 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
     toast.autovacuum_analyze_scale_factor
 );
 {% else %}
-{% if data.toast_autovacuum_enabled is defined or has_vacuum_toast_set %}
+{% if (data.toast_autovacuum_enabled in ('t', 'f') and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled) or has_vacuum_toast_set %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
-{% if data.toast_autovacuum_enabled is defined and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
-    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled %}true{% else %}false{% endif %}{% if has_vacuum_toast_set %},
+{% if data.toast_autovacuum_enabled in ('t', 'f') and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
+    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}true{% else %}false{% endif %}{% if has_vacuum_toast_set %},
 {% endif %}
 {% endif %}
 {% if has_vacuum_toast_set %}
-{% for opt in data.vacuum_toast.set_values %}{% if opt.name and opt.value %}
+{% for opt in data.vacuum_toast.set_values %}{% if opt.name and opt.value is defined %}
     toast.{{opt.name}} = {{opt.value}}{% if not loop.last %},
 {% endif %}
 {% endif %}
@@ -173,13 +179,19 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
 
 );
 {% endif %}
-{% if has_vacuum_toast_reset %}
+{% if (data.toast_autovacuum_enabled == 'x' and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled) or has_vacuum_toast_reset %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
+{% if data.toast_autovacuum_enabled == 'x' and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
+    toast.autovacuum_enabled{% if has_vacuum_toast_reset %},
+{% endif %}
+{% endif %}
+{% if has_vacuum_toast_reset %}
 {% for opt in data.vacuum_toast.reset_values %}{% if opt.name %}
     toast.{{opt.name}}{% if not loop.last %},
 {% endif %}
 {% endif %}
 {% endfor %}
+{% endif %}
 
 );
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/properties.sql
index d153b0edf..db54a67d3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/properties.sql
@@ -26,8 +26,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
 	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	(CASE WHEN (substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') = 'true')
-	  THEN true ELSE false END) AS autovacuum_enabled,
+	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
@@ -37,8 +36,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(CASE WHEN (substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') =  'true')
-	  THEN true ELSE false END) AS toast_autovacuum_enabled,
+	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
@@ -54,10 +52,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-    -- Added for pgAdmin4
-	(CASE WHEN array_length(rel.reloptions, 1) > 0 THEN true ELSE false END) AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 FROM pg_class rel
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/create.sql
index 87df7a386..9f32fb855 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/create.sql
@@ -66,15 +66,15 @@ CREATE {% if data.relpersistence %}UNLOGGED {% endif %}TABLE {{conn|qtIdent(data
 WITH (
     OIDS = {% if data.relhasoids %}TRUE{% else %}FALSE{% endif %}{% if data.fillfactor %},
     FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.parallel_workers is defined and data.parallel_workers != '' and data.parallel_workers != None %},
-    parallel_workers = {{ data.parallel_workers }}{% endif %}{% if data.autovacuum_custom %},
-    autovacuum_enabled = {% if data.autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}{% endif %}{% if data.toast_autovacuum %},
-    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}
-{% endif %}{% if data.autovacuum_enabled and data.vacuum_table|length > 0 %}
-{% for opt in data.vacuum_table %}{% if opt.name and opt.value %}
+    parallel_workers = {{ data.parallel_workers }}{% endif %}{% if data.autovacuum_enabled in ('t', 'f') %},
+    autovacuum_enabled = {% if data.autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}{% endif %}{% if data.toast_autovacuum_enabled in ('t', 'f') %},
+    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}
+{% endif %}{% if data.autovacuum_custom and data.vacuum_table|length > 0 %}
+{% for opt in data.vacuum_table %}{% if opt.name and opt.value is defined %}
 ,
     {{opt.name}} = {{opt.value}}{% endif %}
-{% endfor %}{% endif %}{% if data.toast_autovacuum_enabled and data.vacuum_toast|length > 0 %}
-{% for opt in data.vacuum_toast %}{% if opt.name and opt.value %}
+{% endfor %}{% endif %}{% if data.toast_autovacuum and data.vacuum_toast|length > 0 %}
+{% for opt in data.vacuum_toast %}{% if opt.name and opt.value is defined %}
 ,
     toast.{{opt.name}} = {{opt.value}}{% endif %}
 {% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/properties.sql
index 80451f12d..aefd87565 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/properties.sql
@@ -27,8 +27,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
 	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
 	substring(array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
-	(CASE WHEN (substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') = 'true')
-	  THEN true ELSE false END) AS autovacuum_enabled,
+	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
@@ -38,8 +37,7 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
 	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(CASE WHEN (substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') =  'true')
-	  THEN true ELSE false END) AS toast_autovacuum_enabled,
+	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
 	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
@@ -55,10 +53,6 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
 	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-    -- Added for pgAdmin4
-	(array_to_string(rel.reloptions, ',') like '%autovacuum%') AS autovacuum_custom,
-	(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 FROM pg_class rel
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/update.sql
index 98e9ebf4b..fc44fe8bc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/update.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/update.sql
@@ -103,14 +103,14 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
     autovacuum_freeze_table_age
 );
 {% else %}
-{% if data.autovacuum_enabled is defined or has_vacuum_set %}
+{% if (data.autovacuum_enabled in ('t', 'f') and data.autovacuum_enabled != o_data.autovacuum_enabled) or has_vacuum_set %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
-{% if data.autovacuum_enabled is defined and data.autovacuum_enabled != o_data.autovacuum_enabled %}
-    autovacuum_enabled = {% if data.autovacuum_enabled %}true{% else %}false{% endif %}{% if has_vacuum_set %},
+{% if data.autovacuum_enabled in ('t', 'f') and data.autovacuum_enabled != o_data.autovacuum_enabled %}
+    autovacuum_enabled = {% if data.autovacuum_enabled == 't' %}true{% else %}false{% endif %}{% if has_vacuum_set %},
 {% endif %}
 {% endif %}
 {% if has_vacuum_set %}
-{% for opt in data.vacuum_table.set_values %}{% if opt.name and opt.value %}
+{% for opt in data.vacuum_table.set_values %}{% if opt.name and opt.value is defined %}
     {{opt.name}} = {{opt.value}}{% if not loop.last %},
 {% endif %}
 {% endif %}
@@ -119,13 +119,19 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
 
 );
 {% endif %}
-{% if has_vacuum_reset %}
+{% if (data.autovacuum_enabled == 'x' and data.autovacuum_enabled != o_data.autovacuum_enabled) or has_vacuum_reset %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
+{% if data.autovacuum_enabled =='x' and data.autovacuum_enabled != o_data.autovacuum_enabled %}
+    autovacuum_enabled{% if has_vacuum_reset %},
+{% endif %}
+{% endif %}
+{% if has_vacuum_reset %}
 {% for opt in data.vacuum_table.reset_values %}{% if opt.name %}
     {{opt.name}}{% if not loop.last %},
 {% endif %}
 {% endif %}
 {% endfor %}
+{% endif %}
 
 );
 {% endif %}
@@ -153,14 +159,14 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
     toast.autovacuum_analyze_scale_factor
 );
 {% else %}
-{% if data.toast_autovacuum_enabled is defined or has_vacuum_toast_set %}
+{% if (data.toast_autovacuum_enabled in ('t', 'f') and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled) or has_vacuum_toast_set %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
-{% if data.toast_autovacuum_enabled is defined and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
-    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled %}true{% else %}false{% endif %}{% if has_vacuum_toast_set %},
+{% if data.toast_autovacuum_enabled in ('t', 'f') and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
+    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}true{% else %}false{% endif %}{% if has_vacuum_toast_set %},
 {% endif %}
 {% endif %}
 {% if has_vacuum_toast_set %}
-{% for opt in data.vacuum_toast.set_values %}{% if opt.name and opt.value %}
+{% for opt in data.vacuum_toast.set_values %}{% if opt.name and opt.value is defined %}
     toast.{{opt.name}} = {{opt.value}}{% if not loop.last %},
 {% endif %}
 {% endif %}
@@ -169,13 +175,19 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
 
 );
 {% endif %}
-{% if has_vacuum_toast_reset %}
+{% if (data.toast_autovacuum_enabled == 'x' and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled) or has_vacuum_toast_reset %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
+{% if data.toast_autovacuum_enabled == 'x' and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
+    toast.autovacuum_enabled{% if has_vacuum_toast_reset %},
+{% endif %}
+{% endif %}
+{% if has_vacuum_toast_reset %}
 {% for opt in data.vacuum_toast.reset_values %}{% if opt.name %}
     toast.{{opt.name}}{% if not loop.last %},
 {% endif %}
 {% endif %}
 {% endfor %}
+{% endif %}
 
 );
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/create.sql
index 25b243041..9553d99bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/create.sql
@@ -65,15 +65,15 @@ CREATE {% if data.relpersistence %}UNLOGGED {% endif %}TABLE {{conn|qtIdent(data
 {% endif %}
 WITH (
     OIDS = {% if data.relhasoids %}TRUE{% else %}FALSE{% endif %}{% if data.fillfactor %},
-    FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.autovacuum_custom %},
-    autovacuum_enabled = {% if data.autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}{% endif %}{% if data.toast_autovacuum %},
-    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled %}TRUE{% else %}FALSE{% endif %}
-{% endif %}{% if data.autovacuum_enabled and data.vacuum_table|length > 0 %}
-{% for opt in data.vacuum_table %}{% if opt.name and opt.value %}
+    FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.autovacuum_enabled in ('t', 'f') %},
+    autovacuum_enabled = {% if data.autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}{% endif %}{% if data.toast_autovacuum_enabled in ('t', 'f') %},
+    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}
+{% endif %}{% if data.autovacuum_custom and data.vacuum_table|length > 0 %}
+{% for opt in data.vacuum_table %}{% if opt.name and opt.value is defined %}
 ,
     {{opt.name}} = {{opt.value}}{% endif %}
-{% endfor %}{% endif %}{% if data.toast_autovacuum_enabled and data.vacuum_toast|length > 0 %}
-{% for opt in data.vacuum_toast %}{% if opt.name and opt.value %}
+{% endfor %}{% endif %}{% if data.toast_autovacuum and data.vacuum_toast|length > 0 %}
+{% for opt in data.vacuum_toast %}{% if opt.name and opt.value is defined %}
 ,
     toast.{{opt.name}} = {{opt.value}}{% endif %}
 {% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/properties.sql
index 47686a280..6faf6cc71 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/properties.sql
@@ -29,8 +29,7 @@ FROM (
 			WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 		false AS relpersistence,
 		substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-		(CASE WHEN (substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') = 'true')
-			THEN true ELSE false END) AS autovacuum_enabled,
+		(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
 		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
 		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
 		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
@@ -40,8 +39,7 @@ FROM (
 		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
 		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
 		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-		(CASE WHEN (substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)') =  'true')
-			THEN true ELSE false END) AS toast_autovacuum_enabled,
+		(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
 		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
 		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
 		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
@@ -56,10 +54,6 @@ FROM (
 		rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, NULL AS reloftype, NULL AS typname,
 		typ.typrelid AS typoid,
 		(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-			-- Added for pgAdmin4
-		(array_to_string(rel.reloptions, ',') like '%autovacuum%') AS autovacuum_custom,
-		(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 		ARRAY[]::varchar[] AS seclabels,
 		(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/update.sql
index 36eb180db..09817343f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/update.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/update.sql
@@ -59,7 +59,7 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
 
 {% endif %}
 {#####################################################}
-{## change fillfactore settings ##}
+{## change fillfactor settings ##}
 {#####################################################}
 {% if data.fillfactor and data.fillfactor != o_data.fillfactor %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}}
@@ -92,14 +92,14 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
     autovacuum_freeze_table_age
 );
 {% else %}
-{% if data.autovacuum_enabled is defined or has_vacuum_set %}
+{% if (data.autovacuum_enabled in ('t', 'f') and data.autovacuum_enabled != o_data.autovacuum_enabled) or has_vacuum_set %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
-{% if data.autovacuum_enabled is defined and data.autovacuum_enabled != o_data.autovacuum_enabled %}
-    autovacuum_enabled = {% if data.autovacuum_enabled %}true{% else %}false{% endif %}{% if has_vacuum_set %},
+{% if data.autovacuum_enabled in ('t', 'f') and data.autovacuum_enabled != o_data.autovacuum_enabled %}
+    autovacuum_enabled = {% if data.autovacuum_enabled == 't' %}true{% else %}false{% endif %}{% if has_vacuum_set %},
 {% endif %}
 {% endif %}
 {% if has_vacuum_set %}
-{% for opt in data.vacuum_table.set_values %}{% if opt.name and opt.value %}
+{% for opt in data.vacuum_table.set_values %}{% if opt.name and opt.value is defined %}
     {{opt.name}} = {{opt.value}}{% if not loop.last %},
 {% endif %}
 {% endif %}
@@ -108,13 +108,19 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
 
 );
 {% endif %}
-{% if has_vacuum_reset %}
+{% if (data.autovacuum_enabled == 'x' and data.autovacuum_enabled != o_data.autovacuum_enabled) or has_vacuum_reset %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
+{% if data.autovacuum_enabled =='x' and data.autovacuum_enabled != o_data.autovacuum_enabled %}
+    autovacuum_enabled{% if has_vacuum_reset %},
+{% endif %}
+{% endif %}
+{% if has_vacuum_reset %}
 {% for opt in data.vacuum_table.reset_values %}{% if opt.name %}
     {{opt.name}}{% if not loop.last %},
 {% endif %}
 {% endif %}
 {% endfor %}
+{% endif %}
 
 );
 {% endif %}
@@ -142,14 +148,14 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
     toast.autovacuum_analyze_scale_factor
 );
 {% else %}
-{% if data.toast_autovacuum_enabled is defined or has_vacuum_toast_set %}
+{% if (data.toast_autovacuum_enabled in ('t', 'f') and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled) or has_vacuum_toast_set %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
-{% if data.toast_autovacuum_enabled is defined and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
-    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled %}true{% else %}false{% endif %}{% if has_vacuum_toast_set %},
+{% if data.toast_autovacuum_enabled in ('t', 'f') and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
+    toast.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}true{% else %}false{% endif %}{% if has_vacuum_toast_set %},
 {% endif %}
 {% endif %}
 {% if has_vacuum_toast_set %}
-{% for opt in data.vacuum_toast.set_values %}{% if opt.name and opt.value %}
+{% for opt in data.vacuum_toast.set_values %}{% if opt.name and opt.value is defined %}
     toast.{{opt.name}} = {{opt.value}}{% if not loop.last %},
 {% endif %}
 {% endif %}
@@ -158,13 +164,19 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} SET (
 
 );
 {% endif %}
-{% if has_vacuum_toast_reset %}
+{% if (data.toast_autovacuum_enabled == 'x' and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled) or has_vacuum_toast_reset %}
 ALTER TABLE {{conn|qtIdent(data.schema, data.name)}} RESET (
+{% if data.toast_autovacuum_enabled == 'x' and data.toast_autovacuum_enabled != o_data.toast_autovacuum_enabled %}
+    toast.autovacuum_enabled{% if has_vacuum_toast_reset %},
+{% endif %}
+{% endif %}
+{% if has_vacuum_toast_reset %}
 {% for opt in data.vacuum_toast.reset_values %}{% if opt.name %}
     toast.{{opt.name}}{% if not loop.last %},
 {% endif %}
 {% endif %}
 {% endfor %}
+{% endif %}
 
 );
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/gpdb_5.0_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/gpdb_5.0_plus/properties.sql
index ca7231acb..8c6ffba81 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/gpdb_5.0_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/gpdb_5.0_plus/properties.sql
@@ -62,10 +62,6 @@ FROM (
 		rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, NULL AS reloftype, typ.typname AS typname,
 		typ.typrelid AS typoid,
 		(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-			-- Added for pgAdmin4
-		(CASE WHEN array_length(rel.reloptions, 1) > 0 THEN true ELSE false END) AS autovacuum_custom,
-		(CASE WHEN array_length(tst.reloptions, 1) > 0 AND rel.reltoastrelid != 0 THEN true ELSE false END) AS toast_autovacuum,
-
 		ARRAY[]::varchar[] AS seclabels,
 		(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_parameters.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_parameters.py
index bbed26998..4bd59f5c1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_parameters.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_parameters.py
@@ -25,25 +25,104 @@ class TableUpdateParameterTestCase(BaseTestGenerator):
     """This class will add new collation under schema node."""
     scenarios = [
         # Fetching default URL for table node.
-        ('Enable custom auto vacuum and set the parameters for table',
-         dict(url='/browser/table/obj/', type='set_vacuum_parameters')
+        ('Enable custom auto vacuum and set the parameters for table '
+         'without autovacuum_enabled',
+         dict(url='/browser/table/obj/',
+              api_data={
+                  'autovacuum_custom': True,
+                  'vacuum_table': {
+                      'changed': [
+                          {'name': 'autovacuum_vacuum_cost_delay',
+                           'value': 20},
+                          {'name': 'autovacuum_vacuum_threshold',
+                           'value': 20}
+                      ]
+                  }}
+              )
          ),
-        ('Disable auto vacuum and reset the parameters for table',
-         dict(url='/browser/table/obj/', type='reset_vacuum_parameters')
+        ('Change a parameter to zero value '
+         'without autovacuum_enabled',
+         dict(url='/browser/table/obj/',
+              api_data={
+                  'vacuum_table': {
+                      'changed': [
+                          {'name': 'autovacuum_vacuum_cost_delay',
+                           'value': 0}
+                      ]
+                  }}
+              )
          ),
-        ('Disable custom auto vacuum and reset all the parameters for table',
-         dict(url='/browser/table/obj/', type='reset_all_vacuum_parameters')
+        ('Enable autovacuum_enabled',
+         dict(url='/browser/table/obj/',
+              api_data={'autovacuum_enabled': 't'}
+              )
          ),
-        ('Enable custom auto vacuum and set the toast parameters for table',
-         dict(url='/browser/table/obj/', type='set_toast_parameters')
+        ('Reset individual parameters for table',
+         dict(url='/browser/table/obj/',
+              api_data={
+                  'autovacuum_enabled': 'x',
+                  'vacuum_table': {
+                      'changed': [
+                          {'name': 'autovacuum_vacuum_cost_delay',
+                           'value': None},
+                      ]
+                  }}
+              )
          ),
-        ('Disable auto vacuum and reset the toast parameters for table',
-         dict(url='/browser/table/obj/', type='reset_toast_parameters')
+        ('Reset custom auto vacuum',
+         dict(url='/browser/table/obj/',
+              api_data={'autovacuum_custom': False}
+              )
+         ),
+        ('Enable toast custom auto vacuum and set the parameters for table '
+         'without autovacuum_enabled',
+         dict(url='/browser/table/obj/',
+              api_data={
+                  'toast_autovacuum': True,
+                  'vacuum_toast': {
+                      'changed': [
+                          {'name': 'autovacuum_vacuum_cost_delay',
+                           'value': 20},
+                          {'name': 'autovacuum_vacuum_threshold',
+                           'value': 20}
+                      ]
+                  }}
+              )
+         ),
+        ('Change a toast parameter to zero value '
+         'without autovacuum_enabled',
+         dict(url='/browser/table/obj/',
+              api_data={
+                  'vacuum_toast': {
+                      'changed': [
+                          {'name': 'autovacuum_vacuum_cost_delay',
+                           'value': 0}
+                      ]
+                  }}
+              )
+         ),
+        ('Enable toast.autovacuum_enabled',
+         dict(url='/browser/table/obj/',
+              api_data={'toast_autovacuum_enabled': 't'}
+              )
+         ),
+        ('Reset individual toast parameters for table',
+         dict(url='/browser/table/obj/',
+              api_data={
+                  'toast_autovacuum_enabled': 'x',
+                  'vacuum_toast': {
+                      'changed': [
+                          {'name': 'autovacuum_vacuum_cost_delay',
+                           'value': None},
+                      ]
+                  }}
+              )
+         ),
+        ('Reset auto vacuum',
+         dict(url='/browser/table/obj/',
+              api_data={'toast_autovacuum': False}
+              )
          ),
-        ('Disable custom auto vacuum and reset all the toast '
-         'parameters for table',
-         dict(url='/browser/table/obj/', type='reset_all_toast_parameters')
-         )
     ]
 
     @classmethod
@@ -77,50 +156,8 @@ class TableUpdateParameterTestCase(BaseTestGenerator):
         if not table_response:
             raise Exception("Could not find the table to update.")
 
-        data = None
-        if self.type == 'set_vacuum_parameters':
-            data = dict({'oid': self.table_id,
-                         'autovacuum_custom': True,
-                         'autovacuum_enabled': True,
-                         'vacuum_table': dict({'changed': [
-                             {'name': 'autovacuum_vacuum_cost_delay',
-                              'value': 20},
-                             {'name': 'autovacuum_vacuum_threshold',
-                              'value': 20}
-                         ]})})
-        elif self.type == 'reset_vacuum_parameters':
-            data = dict({'oid': self.table_id,
-                         'autovacuum_enabled': False,
-                         'vacuum_table': dict({'changed': [
-                             {'name': 'autovacuum_vacuum_cost_delay',
-                              'value': None},
-                             {'name': 'autovacuum_vacuum_threshold',
-                              'value': None}
-                         ]})})
-        elif self.type == 'reset_all_vacuum_parameters':
-            data = dict({'oid': self.table_id, 'autovacuum_custom': False})
-        elif self.type == 'set_toast_parameters':
-            data = dict({'oid': self.table_id,
-                         'autovacuum_custom': True,
-                         'autovacuum_enabled': True,
-                         'vacuum_toast': dict({'changed': [
-                             {'name': 'autovacuum_vacuum_cost_delay',
-                              'value': 20},
-                             {'name': 'autovacuum_vacuum_threshold',
-                              'value': 20}
-                         ]})})
-        elif self.type == 'reset_toast_parameters':
-            data = dict({'oid': self.table_id,
-                         'autovacuum_enabled': False,
-                         'vacuum_toast': dict({'changed': [
-                             {'name': 'autovacuum_vacuum_cost_delay',
-                              'value': None},
-                             {'name': 'autovacuum_vacuum_threshold',
-                              'value': None}
-                         ]})})
-        elif self.type == 'reset_all_toast_parameters':
-            data = dict({'oid': self.table_id, 'autovacuum_custom': False})
-
+        data = self.api_data
+        data['oid'] = self.table_id
         response = self.tester.put(self.url + str(utils.SERVER_GROUP) + '/' +
                                    str(self.server_id) + '/' +
                                    str(self.db_id) + '/' +
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py
index c552006ab..b1dff61a6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py
@@ -1029,6 +1029,11 @@ class BaseTableView(PGChildNodeView, BasePartitionTable):
                 data['partition_scheme'] = self.get_partition_scheme(data)
                 partitions_sql = self.get_partitions_sql(data)
 
+            # Update the vacuum table settings.
+            self.update_vacuum_settings('vacuum_table', data)
+            # Update the vacuum toast table settings.
+            self.update_vacuum_settings('vacuum_toast', data)
+
             SQL = render_template("/".join([self.table_template_path,
                                             'create.sql']),
                                   data=data, conn=self.conn)
@@ -1496,7 +1501,7 @@ class BaseTableView(PGChildNodeView, BasePartitionTable):
 
         return schema_name, table_name
 
-    def update_vacuum_settings(self, vacuum_key, old_data, data):
+    def update_vacuum_settings(self, vacuum_key, old_data, data=None):
         """
         This function iterate the vacuum and vacuum toast table and create
         two new dictionaries. One for set parameter and another for reset.
@@ -1507,8 +1512,13 @@ class BaseTableView(PGChildNodeView, BasePartitionTable):
         :return:
         """
 
+        # When creating a table old_data is the actual data
+        if data is None and vacuum_key in old_data:
+            for opt in old_data[vacuum_key]:
+                if 'value' in opt and opt['value'] is None:
+                    opt.pop('value')
         # Iterate vacuum table
-        if vacuum_key in data and 'changed' in data[vacuum_key] \
+        elif vacuum_key in data and 'changed' in data[vacuum_key] \
                 and vacuum_key in old_data:
             set_values = []
             reset_values = []
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py
index be3c43c52..f7b8e701b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/utils.py
@@ -10,6 +10,7 @@
 """Schema collection node helper class"""
 
 import json
+import copy
 
 from flask import render_template
 
@@ -575,8 +576,8 @@ class VacuumSettings:
         * type - table/toast vacuum type
         """
 
-        vacuum_settings_tmp = self.fetch_default_vacuum_settings(
-            conn, self.manager.sid, type)
+        vacuum_settings_tmp = copy.deepcopy(self.fetch_default_vacuum_settings(
+            conn, self.manager.sid, type))
 
         for row in vacuum_settings_tmp:
             row_name = row['name']
@@ -585,6 +586,7 @@ class VacuumSettings:
             if row_name in result and result[row_name] is not None:
                 if row['column_type'] == 'number':
                     value = float(result[row_name])
+                    value = int(value) if value % 1 == 0 else value
                 else:
                     value = int(result[row_name])
                 row['value'] = value
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/static/js/mview.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/static/js/mview.js
index 34d45773c..2a08712b4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/static/js/mview.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/static/js/mview.js
@@ -140,8 +140,8 @@ define('pgadmin.node.mview', [
         },
         defaults: {
           spcname: undefined,
-          toast_autovacuum_enabled: false,
-          autovacuum_enabled: false,
+          toast_autovacuum_enabled: 'x',
+          autovacuum_enabled: 'x',
           warn_text: undefined,
         },
         schema: [{
