Skip to content

[Feature Request] Explicit Connection Management Actions (Connect / Reconnect / Disconnect) #213

@ericgomez

Description

@ericgomez

Feature Description

I’d like to request more explicit connection management actions in the vscode-pgsql extension for Visual Studio Code, including dedicated options for Connect, Reconnect (Invalidate), and Disconnect.

Image

Proposed Capabilities

  • Explicit Connect action to manually establish a database connection.
  • Reconnect / Invalidate Connection option to:
    • Refresh stale or expired connections
    • Clear cached sessions or credentials
  • Disconnect action to explicitly close an active connection.
  • Clear visual indicators for connection state:
    • Connected
    • Disconnected
    • Stale / invalid
  • Access to these actions from:
    • Connection context menu
    • Toolbar or Command Palette
  • Optional keyboard shortcuts for faster workflows.

Problem & Motivation

Currently, connection state handling in vscode-pgsql can feel implicit or unclear. When credentials expire, VPNs change, or sessions become stale, there is no clear way to explicitly invalidate and reconnect a connection.

This can lead to:

  • Confusing connection errors
  • Queries failing due to stale sessions
  • Recreating connections unnecessarily

Use Case

  • Switching between local, staging, and production environments
  • Working with VPNs or unstable networks
  • Refreshing credentials or tokens
  • Managing multiple active connections safely

Request

Please consider adding explicit Connect, Reconnect (Invalidate), and Disconnect actions to improve clarity, reliability, and overall user experience in vscode-pgsql.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions