Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex MPP Analytics for PostgreSQL
  • Getting started
    • All guides
      • Role and user management
      • Managing resource groups
      • User authentication rules
      • Monitoring and managing sessions and queries in the Command Center
      • Managing client processes and user sessions
    • Connecting to an external file server (gpfdist)
    • Auxiliary utilities
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Getting a list of processes
  • Canceling a user session
  • Terminating a specific process
  • Closing a database connection
  • Load management
  1. Step-by-step guides
  2. Users and sessions
  3. Managing client processes and user sessions

Managing client processes and user sessions

Written by
Yandex Cloud
Updated at May 22, 2025
  • Getting a list of processes
  • Canceling a user session
  • Terminating a specific process
  • Closing a database connection
  • Load management

Greenplum® launches a new internal process for each client connection. An administrator or any other user with the mdb_admin role can do the following:

  • Get a list of processes.
  • Cancel a user session.
  • Terminate a specific process.
  • Close a database connection.
  • Manage load.

Getting a list of processesGetting a list of processes

Run a query to the mdb_toolkit.pg_stat_activity() function. The resulting list of processes will include user queries:

SELECT usename, pid, waiting, state, query, datname
FROM mdb_toolkit.pg_stat_activity();

Result:

 usename |  pid     | waiting | state  |         query          | datname
---------+----------+---------+--------+------------------------+---------
  sammy  |   31861  |    f    | idle   | SELECT * FROM testtbl; | testdb
  billy  |   31905  |    t    | active | SELECT * FROM topten;  | testdb

Where:

  • usename: Username.

  • pid: Process ID.

  • waiting: Process is awaiting a transaction:

    • t: Yes.
    • f: No.
  • state: Process state:

    • active: Running.
    • idle: Idle.
  • query: Query.

  • datname: Database name.

Canceling a user sessionCanceling a user session

  1. Terminate the session process.
  2. Terminate the DB connection.

Terminating a specific processTerminating a specific process

Run a query to the mdb_toolkit.gp_cancel_backend() function:

SELECT *
FROM mdb_toolkit.gp_cancel_backend(<process_ID>);

You can get the process ID with the list of cluster processes.

Closing a database connectionClosing a database connection

Run a query to the mdb_toolkit.gp_terminate_backend() function:

SELECT *
FROM mdb_toolkit.gp_terminate_backend(<process_ID>);

You can get the process ID with the list of cluster processes.

Load managementLoad management

  1. Run a query to the gp_toolkit.gp_resgroup_config file to get the resource group name and find out the current number of concurrent transactions:

    SELECT groupname, concurrency
    FROM gp_toolkit.gp_resgroup_config;
    
  2. Set the number of concurrent transactions for a resource group:

    ALTER RESOURCE GROUP <resource_group_name>
    SET concurrency <number_of_concurrent_transactions>;
    

Greenplum® and Greenplum Database® are registered trademarks or trademarks of Broadcom Inc. in the United States and/or other countries.

Was the article helpful?

Previous
Monitoring and managing sessions and queries in the Command Center
Next
Overview
© 2025 Direct Cursus Technology L.L.C.