Skip to content

Commit

Permalink
Added support for viewing PGD Clusters. #7215
Browse files Browse the repository at this point in the history
  • Loading branch information
adityatoshniwal committed May 20, 2024
1 parent d6a9f8a commit 3966280
Show file tree
Hide file tree
Showing 67 changed files with 2,238 additions and 437 deletions.
Binary file added docs/en_US/images/pgd_group_node_dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/en_US/images/pgd_server_node_dialog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/en_US/images/replica_nodes_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions docs/en_US/managing_cluster_objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*********************************
`Managing Cluster Objects`:index:
*********************************

Some object definitions reside at the cluster level; pgAdmin 4 provides dialogs
that allow you to create these objects, manage them, and control their
relationships to each other. To access a dialog that allows you to create a
Expand All @@ -12,11 +12,12 @@ and select the *Create* option for that object. For example, to create a new
database, right-click on the *Databases* node, and select *Create Database...*

.. toctree::
:maxdepth: 1
:maxdepth: 3

database_dialog
resource_group_dialog
role_dialog
tablespace_dialog
replica_nodes_dialog
pgd_replication_group_dialog
role_reassign_dialog
40 changes: 40 additions & 0 deletions docs/en_US/pgd_replication_group_dialog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.. _pgd_replication_group_dialog:

******************************************
`PGD Replication Group Node Dialog`:index:
******************************************

Use the *Replication Group Node* dialog to view a PGD group/sub-group.
A PGD cluster's nodes are gathered in groups. A group can also contain zero or more subgroups.
Subgroups can be used to represent data centers or locations allowing commit scopes to refer to
nodes in a particular region as a whole.

The dialog organizes the information through the following tabs:
*General*

.. image:: images/pgd_group_node_dialog.png
:alt: Replication Group Node Dialog general tab
:align: center

* The *ID* field is the ID of the node group.
* The *Name* field is the name of the node group.
* The *Location* field is the name of the location associated with the node group.
* The *Type* field is the type of the node group, one of "global", "data", "shard" or "subscriber-only".
* The *Streaming Mode* field is the transaction streaming setting of the node group, one of "off", "file", "writer",
"auto" or "default"
* The *Enable Proxy Routing?* field tells whether the node group allows routing from pgd-proxy.
* The *Enable Raft?* field tells whether the node group allows Raft Consensus.


Other buttons:

* Click the *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.


A group can have multiple servers and will be visible in the object explorer tree.

.. toctree::
pgd_replication_server_dialog
30 changes: 30 additions & 0 deletions docs/en_US/pgd_replication_server_dialog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. _pgd_replication_server_dialog:

*******************************************
`PGD Replication Server Node Dialog`:index:
*******************************************

Use The *Replication Server Node* dialog to view an element that run
databases and participate in the PGD cluster. A typical PGD node runs a Postgres
database, the BDR extension, and optionally a PGD Proxy service.

The dialog organizes the information through the following tabs:
*General*

.. image:: images/pgd_server_node_dialog.png
:alt: Replication Server Node Dialog general tab
:align: center

* The *Sequence ID* field is the identifier of the node used for generating unique sequence numbers.
* The *ID* field is the OID of the node.
* The *Name* field is the name of the node.
* The *Kind* field is the node kind name.
* The *Group Name* field is the PGD group the node is part of.
* The *Local DB Name* field is the database name of the node.

Other buttons:

* Click the *Info* button (i) to access online help.
* Click the *Save* button to save work.
* Click the *Close* button to exit without saving work.
* Click the *Reset* button to restore configuration parameters.
2 changes: 1 addition & 1 deletion web/pgadmin/browser/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def module_use_template_javascript(self):
return True

def generate_browser_node(
self, node_id, parent_id, label, icon, **kwargs
self, node_id, parent_id, label, icon=None, **kwargs
):
obj = {
"id": "%s_%s" % (self.node_type, node_id),
Expand Down
3 changes: 3 additions & 0 deletions web/pgadmin/browser/server_groups/servers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,9 @@ def register(self, app, options):
from .replica_nodes import blueprint as module
self.submodules.append(module)

from .pgd_replication_groups import blueprint as module
self.submodules.append(module)

super().register(app, options)

# We do not have any preferences for server node.
Expand Down
Loading

0 comments on commit 3966280

Please sign in to comment.