Managing a Database on pgEdge Cloud

Highlight a database name in the navigation tree to display detailed database information in the pgEdge console.

pgEdge Database Console

Console content is displayed in a series of panes that simplify database management; select a pane to review information or perform management tasks.

The Console Header

Console Header

The console header tells you:

  • The name of the database; next to the name, a dot indicates the status of the database:

    • A green dot indicates that the database is available for connections.
    • A blue dot indicates that the database is being created.
    • A red dot indicates that the database is not available.
  • How long the database has been running.

  • The cluster on which the database is deployed.

  • The PostgreSQL database version.

  • The version of the Spock extension in use by the database.

On the right-side of the console header, you'll find the Actions drop-down menu. Use the Delete Database menu option to delete the currently selected database.

The Get Started Pane

If you did not install the sample database (creating tables), the console displays the Get Started pane at the top. The pane displays a PSQL connection string that you can use to connect to the database as the admin user (a database superuser).

Get Started

For detailed information about:

The Start Replication Pane

If you enabled AutoDDL when configuring your new database with the Northwind sample data, the Start Replication bar is not displayed. If you installed the sample Northwind tables with AutoDDL disabled, the database console opens with the Start Replication pane displaying the sample tables that are ready to replicate.

Start Replication

Press the Start Replication bar to start replication for the sample objects listed above the bar.

The Tables Pane

The Tables pane displays the schema name (public), table names, and an icon that indicates the state of the table. The pane displays the names of tables added with a PostgreSQL client as well.

Northwind Sample Tables

An icon to the left of the table name indicates the state of each table:

  • A grey icon indicates that the table is ready for replication.
  • A blue icon indicates that the table is currently replicating.
  • A red icon indicates that the table cannot be replicated. To be replicated, a table must have a primary key.

Double-click a table name to open the table viewer, displaying the contents of the table.

The Users Pane

Users Pane

In its initial state, a new database has three Users:

  • The admin user is a database superuser. Use this identity for your first login; the password is included in the PSQL connection string on the console.
  • The app user is a login user without superuser privileges.
  • The app_read_only user is a login user without privileges to make changes to the database.

You can use psql or pgAdmin to create additional database users (opens in a new tab); remember the principal of least privileges (opens in a new tab) as you share database login access.

Connect to your database

The Connect to your database pane displays connection information for the nodes in your cluster. Select a node (Nearest node, n1, n2, or n3) and user name to access connection details for a specific node/user pair.

Users Pane

For detailed information about using the connection information to connect to your database, see Connecting.

Password Management

A random password is generated for each pre-defined Cloud user when you create a database; the same user name/password pair can be used to access the database on each node of the cluster. The associated password and password management options are located in the Connect to your database pane. To access the password associated with one of the users (app, app_read_only, or admin), select the user name from the User field.

Password management options

Then, use options in the Password field to manage the password assigned to the app user:

  • Select show to display the password in unobscured form; select hide to conceal the password.
  • Select the Copy icon (at the right side of the pane) to copy the password in an unobscured (usable) form.
  • Select the Rotate Password icon (next to the Copy icon) to generate a new password and assign that password to the currently selected user:

Updating a password

To confirm that you wish to generate a new password and invalidate the old password, click the Rotate Password button; to exit the dialog without changing the password, click Cancel.

The Code Snippet Pane

The Code Snippet pane displays three code snippets (TypeScript, Python, and Go) that set the environment variables for your cluster and create a cursor that lists the nodes in your cluster. Select a tab to review and copy the code.

Code Snippets

Consider the snippets a starting point for the application developers on your team.

The Cluster Map

A map in the pgEdge console displays the nodes in your distributed replication cluster; hover over a node to display the region name and location.

The cluster map

The Usage Pane

If you are using Developer Edition, the Usage pane displays a bar graph showing how much space you have used and available in your cluster. If you are using Enterprise Edition, database resources are limited only by the size of your underlying nodes (virtual machines).

Usage Pane

Node Metrics

The Node Metrics section of the console displays an overview of the resources used by the cluster in the last hour. Tabs across the top of the section allow you to display the metrics for the entire cluster or select the metrics for an individual node.

The All nodes tab shows bar graphs that compare resource usage for all three nodes of your cluster.

Node Metrics

Select the tab for a named node to see activity and resource use for each individual node of your cluster.

Detailed usage is color coded; select a tab to display details about resource usage on a specific node. For detailed metrics for a specific point in time, hover over a graph.

PIT Metrics

CommandDescription
CPUThe CPU graph displays information about the CPU usage for the server.
MemoryThe Memory graph displays information about memory usage (in MB) for the cluster or by the node.
Replication OutputThe Replication Output graph displays the replication traffic for the database in tuples.

Logs

A tabbed panel allows you to access different log files for each node:

Database log files

Use tabs across the top of the panel to select the node for which you wish to view log files; after selecting the node, choose the log file type:

  • Select Postgres to view the logs from the PostgreSQL database on the selected node.
  • Select Tricorder to view Tricorder logs. Tricorder is a companion service that collects metrics and provides HTTP connectivity via the pREST API.
  • Select Vector to view the Vector logs. Vector collects Tricorder metrics for forwarding to AWS CloudWatch. Vector logs are only available for Enterprise AWS customers that enable CloudWatch metrics.