Skip to content

pgAdmin4 hangs when resetting statistics for tables with XML/HTML-escaped names #9867

@faharabbas-bug-hunter

Description

@faharabbas-bug-hunter

Description
When a table is created using a name containing specific special characters (HTML/XML tags and namespaces), pgAdmin4 becomes unresponsive (hangs) upon attempting to "Reset Statistics" for that specific object.
Environment Details
• OS: Windows 11
• PostgreSQL Version: 18.3 (EDB Distribution)
• pgAdmin4 Version: 9.14
• Browser (if applicable): Desktop App


Steps to Reproduce

  1. Launch pgAdmin4 and connect to a server.
  2. Open the Query Tool on any database (e.g., postgres).
  3. Execute the following DDL to create a table with a malformed/complex name:
    SQL
    CREATE TABLE IF NOT EXISTS public."<?xml:namespace prefix=""t"" ns=""urn:schemas-microsof"
    (
    -- No columns required for reproduction
    )
    TABLESPACE pg_default;
  4. Locate the newly created table in the Browser Tree (under Schema > Tables).
  5. Right-click on the table name.
  6. Select Maintenance... or Reset Statistics from the context menu.
  7. Observe the application behavior.
    Expected Result
    The statistics should be reset successfully, or a standard error message should appear if the name causes a syntax conflict. The UI should remain responsive.
    Actual Result
    pgAdmin4 hangs indefinitely. The application becomes unresponsive, requiring a forced task termination (End Task) to close.

Analysis / Root Cause Hypothesis
The issue likely stems from how pgAdmin4 handles the sanitization or parsing of the table name when passing it to the internal statistics-reset function. The presence of and <?xml:namespace may be interfering with the underlying JavaScript/Python communication or causing a rendering loop in the UI.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions