diff --git a/web/pgadmin/static/js/slickgrid/editors.js b/web/pgadmin/static/js/slickgrid/editors.js
index 4e386eb28..4ca2c05b6 100644
--- a/web/pgadmin/static/js/slickgrid/editors.js
+++ b/web/pgadmin/static/js/slickgrid/editors.js
@@ -47,7 +47,7 @@ import Alertify from 'pgadmin.alertifyjs';
 
   // return json editor element
   function getJsonEditor() {
-    return $('<div id=\'pg-json-editor\' hidefocus\'>');
+    return $('<div id=\'pg-json-editor\' hidefocus>');
   }
 
   // Generate and return editor buttons
@@ -396,7 +396,7 @@ import Alertify from 'pgadmin.alertifyjs';
           var jsonContainer = document.getElementById('pg-json-editor');
           var options = {
             modes: ['code', 'form', 'tree','preview'],
-            onError: function (){ Alertify.alert(gettext('Please fix errors in json contents before switching mode.'));}
+            onError: function (){ Alertify.error(gettext('Please fix errors in json contents before switching mode.'));}
           };
           $editor = new JSONEditor(jsonContainer, options);
           $editor.setText(data);
@@ -415,7 +415,7 @@ import Alertify from 'pgadmin.alertifyjs';
           var jsonContainer = document.getElementById('pg-json-editor');
           var options = {
             modes: ['code', 'form', 'tree','preview'],
-            onError: function (){Alertify.alert(gettext('Please fix errors in json contents before switching mode.'));}
+            onError: function (){Alertify.error(gettext('Please fix errors in json contents before switching mode.'));}
           };
           if(jsonContainer) {
             $editor = new JSONEditor(jsonContainer, options);
@@ -628,6 +628,7 @@ import Alertify from 'pgadmin.alertifyjs';
 
     this.position = function(position) {
       calculateEditorPosition(position, $wrapper);
+      position.top = Math.max(position.top, 0);
       $wrapper
         .css('top', position.top)
         .css('left', position.left);
@@ -645,26 +646,30 @@ import Alertify from 'pgadmin.alertifyjs';
     this.loadValue = function(item) {
       var data = defaultValue = item[args.column.field];
       tmpdata = data;
-      if(args.column.column_type_internal === 'jsonb' && !Array.isArray(data)) {
-        data = JSONBigNumber.stringify(JSONBigNumber.parse(data), null, 4);
+      if(args.column.column_type_internal === 'jsonb' && !Array.isArray(data) && data != null) {
+        data = JSONBigNumber.stringify(JSONBigNumber.parse(data), null, 2);
       } else if (Array.isArray(data)) {
         var temp = [];
         $.each(data, function(i, val) {
           if (typeof val === 'object') {
-            temp.push(JSONBigNumber.stringify(val, null, 4));
+            temp.push(JSONBigNumber.stringify(val, null,2));
           } else {
             temp.push(val);
           }
         });
         data = '[' + temp.join() + ']';
       }
-      /* if data is string then convert to json*/
-      if (typeof data === 'string')
-        data = JSON.parse(data);
 
+      /* set editor content to empty if value is null*/
+      if (_.isNull(data)){
+        defaultValue = '';
+        data = '';
+      }
+      /* Create editor if required & set data*/
       require.ensure(['jsoneditor'], function(require) {
         var JSONEditor = require('jsoneditor');
         var jsonContainer = document.getElementById('pg-json-editor');
+        jsonContainer.setAttribute('readonly', true);
         let options = {
           modes: ['code', 'form',  'tree', 'preview'],
           onEditable: function() {
@@ -673,7 +678,7 @@ import Alertify from 'pgadmin.alertifyjs';
         };
         if(jsonContainer) {
           $editor = new JSONEditor(jsonContainer, options);
-          $editor.set(data);
+          $editor.setText(data);
         }
       }, function(error){
         throw(error);
diff --git a/web/pgadmin/static/scss/_jsoneditor.overrides.scss b/web/pgadmin/static/scss/_jsoneditor.overrides.scss
index 7c54c88aa..21938413e 100644
--- a/web/pgadmin/static/scss/_jsoneditor.overrides.scss
+++ b/web/pgadmin/static/scss/_jsoneditor.overrides.scss
@@ -162,6 +162,11 @@ div.jsoneditor-tree button.jsoneditor-button:focus {
     background-color: $color-bg;
 }
 
+/* Ace editor code background readonly*/
+#pg-json-editor[readonly] .ace-jsoneditor .ace_scroller{
+    background-color: $color-gray-light;
+    opacity: $btn-disabled-opacity;
+}
 
 /* Ace editor hide indent guide */
 .ace-jsoneditor .ace_indent-guide {
@@ -188,7 +193,6 @@ div.jsoneditor-tree button.jsoneditor-button:focus {
     background-color:$color-bg !important;
 }
 
-
 /* /* font setting all other mode */
 /* form, tree, code, preview, schema-error  */
 div.jsoneditor-default,
@@ -206,6 +210,19 @@ div.jsoneditor-tree{
     background-color:$color-bg;
 }
 
+/* read only mode */
+#pg-json-editor[readonly] {
+  & div.jsoneditor-tree,
+  & div.jsoneditor td,
+  & div.jsoneditor-readonly,
+  & div.jsoneditor-value,
+  & div.jsoneditor-field,
+  & div.jsoneditor-tree button.jsoneditor-button:focus {
+    background-color: $color-gray-light !important;
+    opacity: 0.85;
+  }
+}
+
 div.jsoneditor td.jsoneditor-tree {
     vertical-align: middle;
 }
@@ -332,6 +349,19 @@ div.jsoneditor-value[contenteditable=true]:hover
     color: $color-fg !important;
 }
 
+/* Replace help text */
+.pico-modal-contents p{
+  visibility: hidden;
+  display: flex;
+  margin-bottom: -1rem;
+}
+
+.pico-modal-contents p::after{
+  visibility: visible;
+  position: absolute;
+  content: "Enter a JMESPath query to filter, sort, or transform the JSON data.";
+  display: block;
+}
 
 /* Fields */
 .jsoneditor-modal,
diff --git a/web/pgadmin/utils/driver/psycopg2/connection.py b/web/pgadmin/utils/driver/psycopg2/connection.py
index 695124273..c36b94fb7 100644
--- a/web/pgadmin/utils/driver/psycopg2/connection.py
+++ b/web/pgadmin/utils/driver/psycopg2/connection.py
@@ -605,11 +605,14 @@ WHERE db.datname = current_database()""")
             can_create_role,
             CASE WHEN roles.rolsuper THEN true
             ELSE roles.rolcreatedb END as can_create_db,
-            CASE WHEN 'pg_signal_backend'=ANY(ARRAY(
-                SELECT pg_catalog.pg_roles.rolname FROM
-                pg_catalog.pg_auth_members m JOIN pg_catalog.pg_roles ON
-                (m.roleid = pg_catalog.pg_roles.oid) WHERE
-                 m.member = roles.oid)) THEN True
+            CASE WHEN 'pg_signal_backend'=ANY(ARRAY(WITH RECURSIVE cte AS (
+            SELECT pg_roles.oid,pg_roles.rolname FROM pg_roles
+                WHERE pg_roles.oid = roles.oid
+            UNION ALL
+            SELECT m.roleid,pgr.rolname FROM cte cte_1
+                JOIN pg_auth_members m ON m.member = cte_1.oid
+                JOIN pg_roles pgr ON pgr.oid = m.roleid)
+            SELECT rolname  FROM cte)) THEN True
             ELSE False END as can_signal_backend
         FROM
             pg_catalog.pg_roles as roles
