Skip to content

VS Code PostgreSQL extension (ms-ossdata.vscode-pgsql v1.24.0) displays a table that was previously dropped #270

Description

@ChandraSaiKarthik

Describe the bug

VS Code PostgreSQL extension (ms-ossdata.vscode-pgsql v1.24.0) displays a table (public.categories) that was previously dropped, even though:

  • Querying pg_tables returns no tables
  • Another instance/session in VS Code shows the table with actual data
  • DBeaver correctly shows no tables

This indicates stale or inconsistent metadata caching across sessions within the extension.

To Reproduce

Steps to reproduce the behavior:

  1. Connect to PostgreSQL (localhost:5432) using VS Code PostgreSQL extension
  2. Create a table public.categories and insert sample data
  3. Drop the table using SQL or external tool (e.g., DBeaver)
  4. In VS Code:

Expand Databases → postgres → Schemas → public → Tables
Click refresh button

  1. Observe:

categories table still appears in the tree
Opening it shows empty structure (no columns, constraints, etc.)

Expected behavior

  • Dropped tables should not appear after refresh
  • Metadata should be consistent across:
    • Explorer tree
    • Query editor sessions
  • Queries against dropped tables should fail consistently
  • Extension should reflect actual DB state (same as DBeaver)

Screenshots

Image Image

VS Code version
Version: 1.122.1 (user setup)
Date: 2026-05-29T09:25:37+02:00
Electron: 39.8.8
ElectronBuildId: 13870025
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26100

Image

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