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 ff69e1afc..e7bea6faa 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
@@ -621,41 +621,8 @@ 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')
+        # Update autovacuum properties
+        self.update_autovacuum_properties(res['rows'][0])
 
         # We will check the threshold set by user before executing
         # the query because that can cause performance issues
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/__init__.py
index e6b79494f..af788459d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/__init__.py
@@ -356,20 +356,44 @@ class PartitionsView(BaseTableView, DataTypeReader, VacuumSettings,
             JSON of selected table node
         """
 
-        SQL = render_template("/".join([self.partition_template_path,
-                                        'properties.sql']),
-                              did=did, scid=scid, tid=tid,
-                              ptid=ptid, datlastsysoid=self.datlastsysoid)
-        status, res = self.conn.execute_dict(SQL)
-        if not status:
-            return internal_server_error(errormsg=res)
+        status, res = self._fetch_properties(did, scid, tid, ptid)
 
         if len(res['rows']) == 0:
             return gone(gettext(
                 "The specified partitioned table could not be found."))
 
         return super(PartitionsView, self).properties(
-            gid, sid, did, scid, ptid, res)
+            gid, sid, did, scid, ptid, res=res)
+
+    def _fetch_properties(self, did, scid, tid, ptid=None):
+
+        """
+        This function is used to fetch the properties of the specified object
+        :param did:
+        :param scid:
+        :param tid:
+        :return:
+        """
+        try:
+            SQL = render_template("/".join([self.partition_template_path,
+                                            'properties.sql']),
+                                  did=did, scid=scid, tid=tid,
+                                  ptid=ptid, datlastsysoid=self.datlastsysoid)
+            status, res = self.conn.execute_dict(SQL)
+            if not status:
+                return internal_server_error(errormsg=res)
+
+            if len(res['rows']) == 0:
+                return False, gone(
+                    gettext("The specified table could not be found."))
+
+            # Update autovacuum properties
+            self.update_autovacuum_properties(res['rows'][0])
+
+        except Exception as e:
+            return False, internal_server_error(errormsg=str(e))
+
+        return True, res
 
     @BaseTableView.check_precondition
     def fetch_objects_to_compare(self, sid, did, scid, tid, ptid=None):
@@ -444,13 +468,7 @@ class PartitionsView(BaseTableView, DataTypeReader, VacuumSettings,
         """
         main_sql = []
 
-        SQL = render_template("/".join([self.partition_template_path,
-                                        'properties.sql']),
-                              did=did, scid=scid, tid=tid,
-                              ptid=ptid, datlastsysoid=self.datlastsysoid)
-        status, res = self.conn.execute_dict(SQL)
-        if not status:
-            return internal_server_error(errormsg=res)
+        status, res = self._fetch_properties(did, scid, tid, ptid)
 
         if len(res['rows']) == 0:
             return gone(gettext(
@@ -627,13 +645,7 @@ class PartitionsView(BaseTableView, DataTypeReader, VacuumSettings,
                 data[k] = v
 
         if ptid is not None:
-            SQL = render_template("/".join([self.partition_template_path,
-                                            'properties.sql']),
-                                  did=did, scid=scid, tid=tid,
-                                  ptid=ptid, datlastsysoid=self.datlastsysoid)
-            status, res = self.conn.execute_dict(SQL)
-            if not status:
-                return internal_server_error(errormsg=res)
+            status, res = self._fetch_properties(did, scid, tid, ptid)
 
         SQL, name = self.get_sql(did, scid, ptid, data, res)
         SQL = re.sub('\n{2,}', '\n\n', SQL)
@@ -674,16 +686,10 @@ class PartitionsView(BaseTableView, DataTypeReader, VacuumSettings,
                 data[k] = v
 
         try:
-            SQL = render_template("/".join([self.partition_template_path,
-                                            'properties.sql']),
-                                  did=did, scid=scid, tid=tid,
-                                  ptid=ptid, datlastsysoid=self.datlastsysoid)
-            status, res = self.conn.execute_dict(SQL)
-            if not status:
-                return internal_server_error(errormsg=res)
+            status, res = self._fetch_properties(did, scid, tid, ptid)
 
             return super(PartitionsView, self).update(
-                gid, sid, did, scid, ptid, data, res, parent_id=tid)
+                gid, sid, did, scid, ptid, data=data, res=res, parent_id=tid)
         except Exception as e:
             return internal_server_error(errormsg=str(e))
 
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 a944c5fff..50d2f0769 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
@@ -995,6 +995,16 @@ function(
           id: 'vacuum_settings_str', label: gettext('Storage settings'),
           type: 'multiline', group: gettext('Advanced'), mode: ['properties'],
         }],
+        sessChanged: function() {
+          /* If only custom autovacuum option is enabled then check if the options table is also changed. */
+          if(_.size(this.sessAttrs) == 2 && this.sessAttrs['autovacuum_custom'] && this.sessAttrs['toast_autovacuum']) {
+            return this.get('vacuum_table').sessChanged() || this.get('vacuum_toast').sessChanged();
+          }
+          if(_.size(this.sessAttrs) == 1 && (this.sessAttrs['autovacuum_custom'] || this.sessAttrs['toast_autovacuum'])) {
+            return this.get('vacuum_table').sessChanged() || this.get('vacuum_toast').sessChanged();
+          }
+          return pgBrowser.DataModel.prototype.sessChanged.apply(this);
+        },
         validate: function(keys) {
           var msg,
             name = this.get('name'),
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/alter_table_add_partition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/alter_table_add_partition.sql
new file mode 100644
index 000000000..ad9c2f44b
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/alter_table_add_partition.sql
@@ -0,0 +1,23 @@
+-- Table: public.test_table_$%{}[]()&*^!@""'`\/#
+
+-- DROP TABLE public."test_table_$%{}[]()&*^!@""""'`\/#";
+
+CREATE TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+(
+    m_col bigint
+) PARTITION BY RANGE (m_col)
+WITH (
+    OIDS = FALSE
+)
+TABLESPACE pg_default;
+
+ALTER TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    OWNER to postgres;
+
+COMMENT ON TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    IS 'comment_01';
+
+-- Partitions SQL
+
+CREATE TABLE public."test_part_$%{}[]()&*^!@""""""""'`\/#" PARTITION OF public."test_table_$%{}[]()&*^!@""""'`\/#"
+    FOR VALUES FROM ('0') TO ('1000');
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/alter_table_add_partition_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/alter_table_add_partition_msql.sql
new file mode 100644
index 000000000..30c1610f5
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/alter_table_add_partition_msql.sql
@@ -0,0 +1,2 @@
+CREATE TABLE public."test_part_$%{}[]()&*^!@""""""""'`\/#" PARTITION OF public."test_table_$%{}[]()&*^!@""""'`\/#"
+    FOR VALUES FROM (0) TO (1000);
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/create_table_with_partition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/create_table_with_partition.sql
new file mode 100644
index 000000000..794355c7b
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/create_table_with_partition.sql
@@ -0,0 +1,18 @@
+-- Table: public.test_table_$%{}[]()&*^!@""'`\/#
+
+-- DROP TABLE public."test_table_$%{}[]()&*^!@""""'`\/#";
+
+CREATE TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+(
+    m_col bigint
+) PARTITION BY RANGE (m_col)
+WITH (
+    OIDS = FALSE
+)
+TABLESPACE pg_default;
+
+ALTER TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    OWNER to postgres;
+
+COMMENT ON TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    IS 'comment_01';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/create_table_with_partition_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/create_table_with_partition_msql.sql
new file mode 100644
index 000000000..8aff6d38c
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/create_table_with_partition_msql.sql
@@ -0,0 +1,13 @@
+CREATE TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+(
+    m_col bigint
+) PARTITION BY RANGE (m_col)
+WITH (
+    OIDS = FALSE
+);
+
+ALTER TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    OWNER to postgres;
+
+COMMENT ON TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    IS 'comment_01';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/test_partitions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/test_partitions.json
new file mode 100644
index 000000000..4683ecbf9
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/10_plus/test_partitions.json
@@ -0,0 +1,139 @@
+{
+  "scenarios": [
+    {
+      "type": "create",
+      "name": "Create Table",
+      "endpoint": "NODE-table.obj",
+      "sql_endpoint": "NODE-table.sql_id",
+      "msql_endpoint": "NODE-table.msql",
+      "data": {
+        "name": "test_table_$%{}[]()&*^!@\"\"'`\\/#",
+        "relowner": "postgres",
+        "relacl": [],
+        "description": "comment_01",
+        "coll_inherits": "[]",
+        "hastoasttable": true,
+        "toast_autovacuum_enabled": "x",
+        "autovacuum_enabled": "x",
+        "primary_key": [],
+        "partitions": [],
+        "partition_type": "range",
+        "is_partitioned": true,
+        "schema": "public",
+        "columns": [
+          {
+            "name": "m_col",
+            "cltype": "bigint",
+            "attacl": [],
+            "is_primary_key": true,
+            "attnotnull": false,
+            "attlen": null,
+            "attprecision": null,
+            "attidentity": "a",
+            "colconstype": "n",
+            "attoptions": [],
+            "seclabels": []
+          }
+        ],
+        "foreign_key": [],
+        "check_constraint": [],
+        "unique_constraint": [],
+        "exclude_constraint": [],
+        "partition_keys": [
+          {
+            "key_type": "column",
+            "pt_column": "m_col"
+          }
+        ],
+        "vacuum_table": [
+          {
+            "name": "autovacuum_analyze_scale_factor"
+          },
+          {
+            "name": "autovacuum_analyze_threshold"
+          },
+          {
+            "name": "autovacuum_freeze_max_age"
+          },
+          {
+            "name": "autovacuum_vacuum_cost_delay"
+          },
+          {
+            "name": "autovacuum_vacuum_cost_limit"
+          },
+          {
+            "name": "autovacuum_vacuum_scale_factor"
+          },
+          {
+            "name": "autovacuum_vacuum_threshold"
+          },
+          {
+            "name": "autovacuum_freeze_min_age"
+          },
+          {
+            "name": "autovacuum_freeze_table_age"
+          }
+        ],
+        "vacuum_toast": [
+          {
+            "name": "autovacuum_freeze_max_age"
+          },
+          {
+            "name": "autovacuum_vacuum_cost_delay"
+          },
+          {
+            "name": "autovacuum_vacuum_cost_limit"
+          },
+          {
+            "name": "autovacuum_vacuum_scale_factor"
+          },
+          {
+            "name": "autovacuum_vacuum_threshold"
+          },
+          {
+            "name": "autovacuum_freeze_min_age"
+          },
+          {
+            "name": "autovacuum_freeze_table_age"
+          }
+        ],
+        "seclabels": [],
+        "forcerlspolicy": false,
+        "like_default_value": false,
+        "like_constraints": false,
+        "like_indexes": false,
+        "like_storage": false,
+        "like_comments": false,
+        "autovacuum_custom": false
+      },
+      "store_object_id": true,
+      "expected_sql_file": "create_table_with_partition.sql",
+      "expected_msql_file": "create_table_with_partition_msql.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alert Table - Add Partition",
+      "endpoint": "NODE-table.obj_id",
+      "sql_endpoint": "NODE-table.sql_id",
+      "msql_endpoint": "NODE-table.msql_id",
+      "data": {
+        "partitions": {
+          "added": [
+            {
+              "is_attach": false,
+              "partition_name": "test_part_$%{}[]()&*^!@\"\"\"\"'`\\/#",
+              "values_from": "0",
+              "values_to": "1000",
+              "is_sub_partitioned": false,
+              "sub_partition_type": "range",
+              "sub_partition_keys": []
+            }
+          ]
+        }
+      },
+      "expected_sql_file": "alter_table_add_partition.sql",
+      "expected_msql_file": "alter_table_add_partition_msql.sql",
+      "store_object_id": true
+    }
+  ]
+}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/alter_table_add_partition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/alter_table_add_partition.sql
new file mode 100644
index 000000000..60002ba7f
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/alter_table_add_partition.sql
@@ -0,0 +1,19 @@
+-- Table: public.test_table_$%{}[]()&*^!@""'`\/#
+
+-- DROP TABLE public."test_table_$%{}[]()&*^!@""""'`\/#";
+
+CREATE TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+(
+    m_col bigint
+) PARTITION BY RANGE (m_col) ;
+
+ALTER TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    OWNER to postgres;
+
+COMMENT ON TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    IS 'comment_01';
+
+-- Partitions SQL
+
+CREATE TABLE public."test_part_$%{}[]()&*^!@""""""""'`\/#" PARTITION OF public."test_table_$%{}[]()&*^!@""""'`\/#"
+    FOR VALUES FROM ('0') TO ('1000');
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/alter_table_add_partition_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/alter_table_add_partition_msql.sql
new file mode 100644
index 000000000..30c1610f5
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/alter_table_add_partition_msql.sql
@@ -0,0 +1,2 @@
+CREATE TABLE public."test_part_$%{}[]()&*^!@""""""""'`\/#" PARTITION OF public."test_table_$%{}[]()&*^!@""""'`\/#"
+    FOR VALUES FROM (0) TO (1000);
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/create_table_with_partition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/create_table_with_partition.sql
new file mode 100644
index 000000000..38b4b02e7
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/create_table_with_partition.sql
@@ -0,0 +1,14 @@
+-- Table: public.test_table_$%{}[]()&*^!@""'`\/#
+
+-- DROP TABLE public."test_table_$%{}[]()&*^!@""""'`\/#";
+
+CREATE TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+(
+    m_col bigint
+) PARTITION BY RANGE (m_col) ;
+
+ALTER TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    OWNER to postgres;
+
+COMMENT ON TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    IS 'comment_01';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/create_table_with_partition_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/create_table_with_partition_msql.sql
new file mode 100644
index 000000000..efca50484
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/create_table_with_partition_msql.sql
@@ -0,0 +1,10 @@
+CREATE TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+(
+    m_col bigint
+) PARTITION BY RANGE (m_col) ;
+
+ALTER TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    OWNER to postgres;
+
+COMMENT ON TABLE public."test_table_$%{}[]()&*^!@""""'`\/#"
+    IS 'comment_01';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/test_partitions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/test_partitions.json
new file mode 100644
index 000000000..4683ecbf9
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/partitions/tests/pg/11_plus/test_partitions.json
@@ -0,0 +1,139 @@
+{
+  "scenarios": [
+    {
+      "type": "create",
+      "name": "Create Table",
+      "endpoint": "NODE-table.obj",
+      "sql_endpoint": "NODE-table.sql_id",
+      "msql_endpoint": "NODE-table.msql",
+      "data": {
+        "name": "test_table_$%{}[]()&*^!@\"\"'`\\/#",
+        "relowner": "postgres",
+        "relacl": [],
+        "description": "comment_01",
+        "coll_inherits": "[]",
+        "hastoasttable": true,
+        "toast_autovacuum_enabled": "x",
+        "autovacuum_enabled": "x",
+        "primary_key": [],
+        "partitions": [],
+        "partition_type": "range",
+        "is_partitioned": true,
+        "schema": "public",
+        "columns": [
+          {
+            "name": "m_col",
+            "cltype": "bigint",
+            "attacl": [],
+            "is_primary_key": true,
+            "attnotnull": false,
+            "attlen": null,
+            "attprecision": null,
+            "attidentity": "a",
+            "colconstype": "n",
+            "attoptions": [],
+            "seclabels": []
+          }
+        ],
+        "foreign_key": [],
+        "check_constraint": [],
+        "unique_constraint": [],
+        "exclude_constraint": [],
+        "partition_keys": [
+          {
+            "key_type": "column",
+            "pt_column": "m_col"
+          }
+        ],
+        "vacuum_table": [
+          {
+            "name": "autovacuum_analyze_scale_factor"
+          },
+          {
+            "name": "autovacuum_analyze_threshold"
+          },
+          {
+            "name": "autovacuum_freeze_max_age"
+          },
+          {
+            "name": "autovacuum_vacuum_cost_delay"
+          },
+          {
+            "name": "autovacuum_vacuum_cost_limit"
+          },
+          {
+            "name": "autovacuum_vacuum_scale_factor"
+          },
+          {
+            "name": "autovacuum_vacuum_threshold"
+          },
+          {
+            "name": "autovacuum_freeze_min_age"
+          },
+          {
+            "name": "autovacuum_freeze_table_age"
+          }
+        ],
+        "vacuum_toast": [
+          {
+            "name": "autovacuum_freeze_max_age"
+          },
+          {
+            "name": "autovacuum_vacuum_cost_delay"
+          },
+          {
+            "name": "autovacuum_vacuum_cost_limit"
+          },
+          {
+            "name": "autovacuum_vacuum_scale_factor"
+          },
+          {
+            "name": "autovacuum_vacuum_threshold"
+          },
+          {
+            "name": "autovacuum_freeze_min_age"
+          },
+          {
+            "name": "autovacuum_freeze_table_age"
+          }
+        ],
+        "seclabels": [],
+        "forcerlspolicy": false,
+        "like_default_value": false,
+        "like_constraints": false,
+        "like_indexes": false,
+        "like_storage": false,
+        "like_comments": false,
+        "autovacuum_custom": false
+      },
+      "store_object_id": true,
+      "expected_sql_file": "create_table_with_partition.sql",
+      "expected_msql_file": "create_table_with_partition_msql.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alert Table - Add Partition",
+      "endpoint": "NODE-table.obj_id",
+      "sql_endpoint": "NODE-table.sql_id",
+      "msql_endpoint": "NODE-table.msql_id",
+      "data": {
+        "partitions": {
+          "added": [
+            {
+              "is_attach": false,
+              "partition_name": "test_part_$%{}[]()&*^!@\"\"\"\"'`\\/#",
+              "values_from": "0",
+              "values_to": "1000",
+              "is_sub_partitioned": false,
+              "sub_partition_type": "range",
+              "sub_partition_keys": []
+            }
+          ]
+        }
+      },
+      "expected_sql_file": "alter_table_add_partition.sql",
+      "expected_msql_file": "alter_table_add_partition_msql.sql",
+      "store_object_id": true
+    }
+  ]
+}
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 c2cfd974a..adeb48b54 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
@@ -30,8 +30,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,
   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,
@@ -41,8 +40,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,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/create.sql
index 365be1d00..9ebc6b260 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/create.sql
@@ -21,26 +21,28 @@ CREATE {% if data.relpersistence %}UNLOGGED {% endif %}TABLE {{conn|qtIdent(data
     {{ data.partition_value }}{% if data.is_partitioned is defined and data.is_partitioned %}
 
     PARTITION BY {{ data.partition_scheme }}{% endif %}
-{% if data.fillfactor 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) %}
-{% set add_comma = false%}
+{% if data.fillfactor or data.autovacuum_custom or data.autovacuum_enabled in ('t', 'f') or data.toast_autovacuum or data.toast_autovacuum_enabled in ('t', 'f') or (data.autovacuum_enabled in ('t', 'f') and data.vacuum_table|length > 0) or (data.toast_autovacuum_enabled in ('t', 'f') and data.vacuum_toast|length > 0) %}
+{% set ns = namespace(add_comma=false) %}
 
 WITH (
-{% if data.fillfactor %}{% set add_comma = true%}
-    FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.autovacuum_custom %}
-{% if add_comma %},
+{% if data.fillfactor %}{% set ns.add_comma = true%}
+    FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.autovacuum_enabled in ('t', 'f') %}
+{% if ns.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 %},
+    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 %}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.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}{% set ns.add_comma = true%}{% 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 %}
+{% if ns.add_comma %},
+{% endif %}
+    {{opt.name}} = {{opt.value}}{% endif %}{% if opt.name and opt.value is defined %}{% set ns.add_comma = true%}{% endif %}
+{% 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 %}
+    toast.{{opt.name}} = {{opt.value}}{% endif %}{% if opt.name and opt.value is defined %}{% set ns.add_comma = true%}{% endif %}
 {% endfor %}{% endif %}
 
 ){% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/nodes.sql
index f8297873f..a357ae9d1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/nodes.sql
@@ -7,11 +7,37 @@ SELECT rel.oid, rel.relname AS name,
     (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
     (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_sub_partitioned,
     (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
-    (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS sub_partition_scheme
+    (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS sub_partition_scheme,
+    (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 '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,
+	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	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,
+	(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,
+	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
+	typ.typrelid AS typoid
 FROM
     (SELECT * FROM pg_inherits WHERE inhparent = {{ tid }}::oid) inh
     LEFT JOIN pg_class rel ON inh.inhrelid = rel.oid
     LEFT JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
+    LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
+    LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
     WHERE rel.relispartition
     {% if ptid %} AND rel.oid = {{ ptid }}::OID {% endif %}
     ORDER BY rel.relname;
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 48e6248d1..eed03bbaa 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
@@ -27,8 +27,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,
@@ -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,
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 c2c8e4274..9de83f353 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
@@ -27,8 +27,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,
@@ -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,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/create.sql
index 279ff99ab..725ed5242 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/create.sql
@@ -21,23 +21,24 @@ CREATE {% if data.relpersistence %}UNLOGGED {% endif %}TABLE {{conn|qtIdent(data
 
     PARTITION BY {{ data.partition_scheme }}{% endif %}
 {% if data.fillfactor 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) %}
-{% set add_comma = false%}
+{% set ns = namespace(add_comma=false) %}
 
 WITH (
-{% if data.fillfactor %}{% set add_comma = true%}
-    FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.autovacuum_custom %}
-{% if add_comma %},
+{% if data.fillfactor %}{% set ns.add_comma = true%}
+    FILLFACTOR = {{ data.fillfactor }}{% endif %}{% if data.autovacuum_enabled in ('t', 'f') %}
+{% if ns.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 %},
+    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 %}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.autovacuum_enabled = {% if data.toast_autovacuum_enabled == 't' %}TRUE{% else %}FALSE{% endif %}{% set ns.add_comma = true%}{% 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 %}
+{% if ns.add_comma %},
+{% endif %}
+    {{opt.name}} = {{opt.value}}{% endif %}{% if opt.name and opt.value is defined %}{% set ns.add_comma = true%}{% endif %}
+{% 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/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 48e6248d1..eed03bbaa 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
@@ -27,8 +27,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,
@@ -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,
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 c2c8e4274..9de83f353 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
@@ -27,8 +27,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,
@@ -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,
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 925f313d1..42fdcb196 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
@@ -69,7 +69,7 @@ CACHE {{c.seqcache|int}} {% endif %}
 {{CONSTRAINTS.EXCLUDE(conn, data.exclude_constraint)}}{% endif %}
 {% if data.like_relation or data.coll_inherits or data.columns|length > 0 or data.primary_key|length > 0 or data.unique_constraint|length > 0 or data.foreign_key|length > 0 or data.check_constraint|length > 0 or data.exclude_constraint|length > 0 %}
 
-){% endif %}{% if data.relkind is defined and data.relkind == 'p' %} PARTITION BY {{ data.partition_scheme }} {% endif %}
+){% endif %}{% if data.relkind is defined and data.relkind == 'p' %} PARTITION BY {{ data.partition_scheme }}{% endif %}
 
 {### If we are inheriting it from another table(s) ###}
 {% if data.coll_inherits %}
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 7e9aa6531..149e608ee 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
@@ -680,6 +680,57 @@ class BaseTableView(PGChildNodeView, BasePartitionTable):
                     part_data['is_partitioned'] = row['is_partitioned']
                     part_data['partition_scheme'] = row['partition_scheme']
 
+                    self.update_autovacuum_properties(row)
+
+                    part_data['fillfactor'] = row['fillfactor']
+                    part_data['autovacuum_custom'] = row['autovacuum_custom']
+                    part_data['autovacuum_enabled'] = row['autovacuum_enabled']
+                    part_data['autovacuum_vacuum_threshold'] = row[
+                        'autovacuum_vacuum_threshold']
+                    part_data['autovacuum_vacuum_scale_factor'] = row[
+                        'autovacuum_vacuum_scale_factor']
+                    part_data['autovacuum_analyze_threshold'] = row[
+                        'autovacuum_analyze_threshold']
+                    part_data['autovacuum_analyze_scale_factor'] = row[
+                        'autovacuum_analyze_scale_factor']
+                    part_data['autovacuum_vacuum_cost_delay'] = row[
+                        'autovacuum_vacuum_cost_delay']
+                    part_data['autovacuum_vacuum_cost_limit'] = row[
+                        'autovacuum_vacuum_cost_limit']
+                    part_data['autovacuum_freeze_min_age'] = row[
+                        'autovacuum_freeze_min_age']
+                    part_data['autovacuum_freeze_max_age'] = row[
+                        'autovacuum_freeze_max_age']
+                    part_data['autovacuum_freeze_table_age'] = row[
+                        'autovacuum_freeze_table_age']
+                    part_data['toast_autovacuum'] = row['toast_autovacuum']
+                    part_data['toast_autovacuum_enabled'] = row[
+                        'toast_autovacuum_enabled']
+                    part_data['toast_autovacuum_vacuum_threshold'] = row[
+                        'toast_autovacuum_vacuum_threshold']
+                    part_data['toast_autovacuum_vacuum_scale_factor'] = row[
+                        'toast_autovacuum_vacuum_scale_factor']
+                    part_data['toast_autovacuum_analyze_threshold'] = row[
+                        'toast_autovacuum_analyze_threshold']
+                    part_data['toast_autovacuum_analyze_scale_factor'] = row[
+                        'toast_autovacuum_analyze_scale_factor']
+                    part_data['toast_autovacuum_vacuum_cost_delay'] = row[
+                        'toast_autovacuum_vacuum_cost_delay']
+                    part_data['toast_autovacuum_vacuum_cost_limit'] = row[
+                        'toast_autovacuum_vacuum_cost_limit']
+                    part_data['toast_autovacuum_freeze_min_age'] = row[
+                        'toast_autovacuum_freeze_min_age']
+                    part_data['toast_autovacuum_freeze_max_age'] = row[
+                        'toast_autovacuum_freeze_max_age']
+                    part_data['toast_autovacuum_freeze_table_age'] = row[
+                        'toast_autovacuum_freeze_table_age']
+
+                    # We will add Auto vacuum defaults with out result for grid
+                    part_data['vacuum_table'] = copy.deepcopy(
+                        self.parse_vacuum_data(self.conn, row, 'table'))
+                    part_data['vacuum_toast'] = copy.deepcopy(
+                        self.parse_vacuum_data(self.conn, row, 'toast'))
+
                     partition_sql += render_template("/".join(
                         [self.partition_template_path, 'create.sql']),
                         data=part_data, conn=self.conn)
@@ -1628,3 +1679,46 @@ class BaseTableView(PGChildNodeView, BasePartitionTable):
 
         if len(reset_values) > 0:
             data[vacuum_key]['reset_values'] = reset_values
+
+    def update_autovacuum_properties(self, res):
+        """
+        This function sets the appropriate value for autovacuum_enabled and
+        autovacuum_custom for table & toast table both.
+        :param res:
+        :return:
+        """
+        # Set value based on
+        # x: No set, t: true, f: false
+        if res is not None:
+            res['autovacuum_enabled'] = 'x' \
+                if res['autovacuum_enabled'] is None else \
+                {True: 't', False: 'f'}[res['autovacuum_enabled']]
+            res['toast_autovacuum_enabled'] = 'x' \
+                if res['toast_autovacuum_enabled'] is None else \
+                {True: 't', False: 'f'}[
+                    res['toast_autovacuum_enabled']]
+            # Enable custom autovaccum only if one of the options is set
+            # or autovacuum is set
+        res['autovacuum_custom'] = any([
+            res['autovacuum_vacuum_threshold'],
+            res['autovacuum_vacuum_scale_factor'],
+            res['autovacuum_analyze_threshold'],
+            res['autovacuum_analyze_scale_factor'],
+            res['autovacuum_vacuum_cost_delay'],
+            res['autovacuum_vacuum_cost_limit'],
+            res['autovacuum_freeze_min_age'],
+            res['autovacuum_freeze_max_age'],
+            res['autovacuum_freeze_table_age']]) or \
+            res['autovacuum_enabled'] in ('t', 'f')
+
+        res['toast_autovacuum'] = any([
+            res['toast_autovacuum_vacuum_threshold'],
+            res['toast_autovacuum_vacuum_scale_factor'],
+            res['toast_autovacuum_analyze_threshold'],
+            res['toast_autovacuum_analyze_scale_factor'],
+            res['toast_autovacuum_vacuum_cost_delay'],
+            res['toast_autovacuum_vacuum_cost_limit'],
+            res['toast_autovacuum_freeze_min_age'],
+            res['toast_autovacuum_freeze_max_age'],
+            res['toast_autovacuum_freeze_table_age']]) or \
+            res['toast_autovacuum_enabled'] in ('t', 'f')
