pgadmin4 icon indicating copy to clipboard operation
pgadmin4 copied to clipboard

%PATH%

Open Dmole opened this issue 1 year ago • 9 comments

Describe the bug

On Windows Backup and Restore exit with no error message.

To Reproduce

Steps to reproduce the behavior:

  1. After using the installer linked from https://www.postgresql.org/download/windows/
  2. Run pgAdmin 4
  3. Create a database
  4. Attempt to Backup from or Restore to the database
  5. See it error with no message or logs

Expected behavior

Backup / Restore should just work. If they fail, pgAdmin 4 should log why.

Error message

Process failed No longs available Exit code 3221225781

Desktop (please complete the following information):

  • OS: Windows 10 (server 2022)
  • pgAdmin 4 Version: 7.8

Additional context

If the shown command is pasted into cmd.exe the following error is shown:

The code execution cannot proceed because libzstd.dll was not found.

echo %errorlevel% -1073741515

Adding the PostgreSQL bin folder to the windows %PATH% fixes the issue.

  • EnterpriseDB should set the %PATH% : https://github.com/EnterpriseDB/edb-installers/issues/123
  • PGAdmin4 should show error messages

Dmole avatar May 10 '24 15:05 Dmole

Hi,

Please uninstall pgAdmin and re-install it from https://www.pgadmin.org/download/ and check.

khushboovashi avatar May 17 '24 10:05 khushboovashi

That seems like a workaround to the problem at hand. We should still fix the underlying issue, as other builds of pg_dump etc. may have similar dependencies.

dpage avatar May 21 '24 15:05 dpage

Please uninstall pgAdmin and re-install it from https://www.pgadmin.org/download/ and check.

@khushboovashi (like postgresql.org) pgadmin.org links to enterprisedb.com for Windows, are you implying there is a fresh build with a fix?

Dmole avatar May 22 '24 15:05 Dmole

Please uninstall pgAdmin and re-install it from https://www.pgadmin.org/download/ and check.

@khushboovashi (like postgresql.org) pgadmin.org links to enterprisedb.com for Windows, are you implying there is a fresh build with a fix?

pgadmin.org doesn't link with enterprisedb.com installers. But as a workaround, suggesting you install the pgAdmin installer, as we do not have this issue.

khushboovashi avatar May 23 '24 05:05 khushboovashi

pgadmin.org doesn't link with enterprisedb.com

curl -s "https://www.pgadmin.org/download/pgagent-windows/" | grep -c enterprisedb.com 1

But I do see now that's the wrong large windows button ( 2x the height and contrast as the < h2 > )

Regardless

we do not have this issue.

I'll test re-installing, breaking the path, and testing if errors are shown.

Dmole avatar May 23 '24 11:05 Dmole

pgadmin.org doesn't link with enterprisedb.com

curl -s "https://www.pgadmin.org/download/pgagent-windows/" | grep -c enterprisedb.com 1

That's for pgAgent, not pgAdmin.

dpage avatar May 23 '24 11:05 dpage

That's for pgAgent, not pgAdmin.

@dpage read the next sentence in that comment and you will see I know that, but the bad page design leads to such errors.

Please uninstall pgAdmin

@khushboovashi that looks like it's not offered as an option without also removing PostgreSQL :/ (one must click uninstall instead of modify, then uninstall all, only then is the remove pgadmin an option)

You can check only pgAdmin checkbox and uninstall it.

re-install it from https://www.pgadmin.org/download/ and check.

@khushboovashi I installed it beside the existing version ( different install location and different shortcut name) and found that while there is no lib/path issue, if I make one (by renaming zlib.dll) pgAdmin fails to report the error that is thrown from pg_dump.

Dmole avatar May 23 '24 15:05 Dmole

@Dmole You don't have to uninstall all. You can select what to uninstall.

yogeshmahajan-1903 avatar May 31 '24 11:05 yogeshmahajan-1903

@yogeshmahajan-1903 I acknowledge that in the comment you are replying to, and it's an aside anyway, focus on:

PGAdmin4 should show error messages from pg_dump, etc.

Dmole avatar May 31 '24 12:05 Dmole

@Dmole

We attempted to capture the error message from pg_dump and pg_dumpall, but the process only returns an exit code: 3221225781. Based on our research, this code typically corresponds to a DLL_NOT_FOUND error, but no additional details are provided.

To handle this, we’ve created a mapping of known exit codes (currently only one, 3221225781) to custom error messages for better clarity in our environment.

We'd appreciate your input if you have an alternative solution or any suggestions.

akshay-joshi avatar Jun 03 '25 07:06 akshay-joshi

Tested and verified on snapshot build: https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2025-06-10/ Package: exe Environment: Windows 11

anilsahoo20 avatar Jun 10 '25 11:06 anilsahoo20