1

Everything I see about pgAgent says that it can be installed using the StackBuilder wizard that runs after installing PostgreSQL. But the StackBuilder wizards I have do not include pgAgent. How can I get pgAgent?

A screenshot of my StackBuilder dialog box showing the lack of pgAgent can be found here: https://i.stack.imgur.com/TLI8I.jpg

ROBERT RICHARDSON
  • 2,077
  • 4
  • 24
  • 57

1 Answers1

1

I think it can't be possible, 9.5 is dead (EOL). but the binaries still can be downloaded from EDB ( https://www.enterprisedb.com/downloads/postgres-postgresql-downloads )

NOTE: pgAgent is available in Debian/Ubuntu (DEB) and Redhat/Fedora (RPM) packages for Linux users, as well as source code

In the official doc says how: https://www.pgadmin.org/docs/pgadmin4/latest/pgagent_install.html#service-installation-on-windows

Service installation on Windows

pgAgent can install itself as a service on Windows systems. The command line options available are similar to those on Unix systems, but include an additional parameter to tell the service what to do:

Usage:
  pgAgent REMOVE <serviceName>
  pgAgent INSTALL <serviceName> [options] <connect-string>
  pgAgent DEBUG [options] <connect-string>

  options:
    -u <user or DOMAIN\user>
    -p <password>
    -d <displayname>
    -t <poll time interval in seconds (default 10)>
    -r <retry period after connection abort in seconds (>=10, default 30)>
    -l <logging verbosity (ERROR=0, WARNING=1, DEBUG=2, default 0)>

The service may be quite simply installed from the command line as follows (adjust the path as required):

"C:\Program Files\pgAgent\bin\pgAgent" INSTALL pgAgent -u postgres -p secret hostaddr=127.0.0.1 dbname=postgres user=postgres

You can then start the service at the command line using net start pgAgent, or from the Services control panel applet. Any logging output or errors will be reported in the Application event log. The DEBUG mode may be used to run pgAgent from a command prompt. When run this way, log messages will output to the command window.

Frank N Stein
  • 2,219
  • 3
  • 22
  • 26
  • Thank you, but I cannot find the installer. Your quote about StackBuilder does not match reality, or at least not my reality. I have the latest 9.5.25 installer, which is fairly recent (but as you note, they say it's the last one). My StackBuilder does not include pgAgent. A screenshot can be seen here: https://imgur.com/PTopsAA . (Is there a better way to add links to a comment?) I'll try to add that screenshot to my question. – ROBERT RICHARDSON Mar 11 '21 at 14:43
  • Yes, I found this note: pgAgent is available in Debian/Ubuntu (DEB) and Redhat/Fedora (RPM) packages for Linux users, as well as source code. Means... for Windows you must compile the SC. Sorry. – Frank N Stein Mar 11 '21 at 14:53