Federal Science DataHubFederal Science DataHub
  • English
  • Français
  • English
  • Français
  • Overview
  • Managing Workspaces and Users

    • Getting a workspace (only available on the GC network)
    • Estimate costs (only available on the GC network)
    • Account Setup
    • Requesting, configuring and removing tools in your workspace
    • Invite a user
    • Change a user role
    • Manage your CBR & workspace budgets
  • Storage

    • Working with Azure Storage
    • Bring Your Own Storage

      • Import AWS S3 Bucket
      • Import Azure Storage
      • Import Google Cloud Platform Storage
    • Access Storage in Databricks
    • Use AzCopy to Interact with Storage
  • Databricks

    • Getting Started with Databricks
    • FSDH Cluster Policies
    • MLFlow: AutoML and Experiments
    • Databricks Workflows
    • Dashboarding

      • How to Dashboard in Databricks
      • Dashboarding Tool Comparison
    • External Extensions

      • Git/GitHub Integration with Databricks
      • Databricks VS Code Extension
      • Working with Conda
      • Connecting Google API to Databricks
  • PostgreSQL

    • Create and use a PostgreSQL Database
    • Add a User to PostgreSQL on FSDH
    • PostgreSQL vs Azure Databricks Database Features
  • Web Applications

    • Hosting Web Apps on DataHub
  • Migrating to Production

    • Migrating Storage
    • Migrating Databricks
    • Migrating PostgreSQL
    • Migrating Web Apps
  • User Guidance

    • Account Management and Access control of workspaces
    • Backup and Recovery
    • Github and code repo management
    • Incident Detection & Response
    • Monitor Usage
    • Monitoring and Auditing a Workspace
    • Source code
    • Restricted File Types on FSDH Storage
  • Terms and Conditions

Add a User to PostgreSQL on FSDH

As a workspace lead, you must create a user account for each user who needs access to the PostgreSQL database on the Federal Science DataHub (FSDH). This guide will walk you through the steps to add a user to the PostgreSQL database on FSDH.

Option A. Using an SQL Query

  1. Connect to the PostgreSQL database using a tool like psql, Python, or any other SQL client.

  2. Run the following SQL query to create a new user:

CREATE USER <username> WITH PASSWORD '<password>';

Replace <username> with the desired username and <password> with the desired password for the new user.

  1. Grant the necessary permissions to the new user. For example, to grant all privileges on a specific database, run the following SQL query:
GRANT ALL PRIVILEGES ON DATABASE <database_name> TO <username>;

Replace <database_name> with the name of the database you want to grant access to.

  1. Validate that the user has been created successfully by checking the list of users in the PostgreSQL database.

Option B. Using pgAdmin

  1. Open pgAdmin and connect to the PostgreSQL database.

  2. Right-click on the Login/Group Roles node and select Create > Login/Group Role.

  3. In the General tab, enter the desired username in the Name field.

Preview 1

  1. In the Definition tab, enter the desired password in the Password field.

  2. In the Role Privileges tab, grant the necessary privileges to the new user.

  3. Click Save to create the new user.

  4. Validate that the user has been created successfully by checking the list of users in the PostgreSQL database.

Edit this page on GitHub
Last Updated: 2026-04-13, 11:39 a.m.
Previous
Create and use a PostgreSQL Database
Next
PostgreSQL vs Azure Databricks Database Features