GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pgadmin version 9.19 Desktop can not run run PSQL tool Binary path set up good. As query tool and export import works · Issue #10796 · pgadmin-org/pgadmin4

pgadmin version 9.19 Desktop can not run run PSQL tool Binary path set up good. As query tool and export import works #10796

New issue
Copy link
New issue
Copy link
Open
Open
pgadmin version 9.19 Desktop can not run run PSQL tool Binary path set up good. As query tool and export import works#10796
Copy link
Labels
Bug

Description

@sk-susi
sk-susi
opened on Nov 18, 2026
Issue body actions

Please note that security bugs or issues should be reported to [email protected].

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. See the error

Expected behavior

A clear and concise description of what you expected to happen.

Error message

If possible, include the full, unedited text of any error messages displayed.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows 10, OSX monterey]
  • pgAdmin version: [e.g. 6.15]
  • Mode: [e.g Desktop or Server]
  • Browser (if running in server mode): [e.g. chrome, safari]
  • Package type: [e.g. RPM, DEB, Python, Container, etc.]

Additional context

Add any other context about the problem here.

Activity

  1. sk-susi
    added
    Bug
    on Nov 18, 2026
  2. sk-susi commented on Nov 18, 2026

    @sk-susi
    sk-susi
    on Nov 18, 2026
    Author
    More actions

    could not find a "" to execute
    could not find a "" to execute
    : error: could not find own program executable

  3. cartomaniac commented on Nov 18, 2026

    @cartomaniac
    cartomaniac
    on Nov 18, 2026
    More actions

    I ran into this exact same issue on Windows (pgAdmin 4 v9.19 Desktop with bundled psql 18.6 in pgAdmin4\runtime).

    Root Cause

    In web/pgadmin/tools/psql/__init__.py inside windows_platform(), PtyProcess.spawn(connection_data, env=get_user_env(env)) spawns psql.exe directly via pywinpty with an empty argv (""). Because argv is blank, PostgreSQL's find_my_exec() fails to locate its own executable—even when the Binary Path is properly configured and added to Windows PATH.

    Verified Workaround

    Wrapping the command with cmd.exe /c inside windows_platform() ensures Windows populates argv properly before psql.exe executes:

    def windows_platform(connection_data, sid, max_read_bytes, server_id,
                         env=None):
        try:
            cmd = ['cmd.exe', '/c', connection_data[0], connection_data[1]]
            process = PtyProcess.spawn(cmd, env=get_user_env(env))
    

    With this change in web/pgadmin/tools/psql/__init__.py (and restarting pgAdmin 4), the PSQL Tool connects cleanly.

  4. spageRDG commented on Nov 20, 2026

    @spageRDG
    spageRDG
    on Nov 20, 2026
    More actions

    I just ran into the same issue.

    After making the edit suggested by @cartomaniac, i received this error:

    'C:\Users\%username%\AppData\Local\Programs\pgAdmin' is
     not recognized as an internal or external command
    ,
    operable program or batch file.
    
  5. dpage commented on Nov 26, 2026

    @dpage
    dpage
    on Nov 26, 2026
    Contributor
    More actions

    Thanks for the reports and the digging, @cartomaniac. 9.19 spawned psql.exe with an empty argv[0], which is why find_my_exec() fails with "could not find own program executable". This is fixed on master for the next release: #10779 moved to pywinpty 3.1.2, which puts the quoted executable path on the command line itself (so paths under C:\Program Files no longer split, which is the error @spageRDG saw after the manual edit), and the PSQL tool no longer relies on a blank argv[0]. Please try 9.20 once it's out, and let us know here if it still fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.