How to install pgAgent service on windows

I am new to postgreSQL database, recently discovered that postgreSQL supports SQL Job by pgAgent. I am using the Windows XP operating system.

I searched a lot about pgAgent on Google and tried to configure pgAgent on the machine.

Download the pgAgent package in which I found the pgagent.sql file after executing this file. The JOB (0) icon appears on my pgAdmin III object bar. as shown below.

enter image description here

But I have to deal with the problem of registering the pgAgent service. According to the postgres sql documentation, the following steps follow for registering services, but I cannot do this. or donโ€™t know how to configure the pgAgent service.

The next step from the postgre sql document:

 The service may be quite simply installed from the command line as follows: "C:\Program Files\pgAdmin III\pgAgent" INSTALL pgAgent -u postgres -p secret hostaddr=127.0.0.1 dbname=pgadmin user=postgres 

but I did a lot for this, please help how to register the pgAgent service with Windows XP.

postgre sql link link: http://www.pgadmin.org/docs/1.6/pgagent-install.html

Please help with this, thanks in Advance!

+8
source share
3 answers

PgAgent probably not installed

The pgAgent download page says:

pgAgent is a job scheduler for PostgreSQL that can be managed using pgAdmin. Prior to pgAdmin v1.9, pgAgent is dispatched as part of pgAdmin. Starting with pgAdmin v1.9, pgAgent is shipped as a standalone application .

And then it provides a download link http://www.postgresql.org/ftp/pgadmin3/release/pgagent/
But the problem is that there is only source code. There are also SQL files in tarball, but they are useless without pgagent.exe .

How to install it

Apparently, the correct way to install the precompiled pgAgent is with the Stack Builder installer, which is also the main Windows installation method for the PostgreSQL server itself. This is what is offered on the official download page: http://www.postgresql.org/download/windows/

If you have already installed PostgreSQL for Windows using this method, the installer is available under the name Application Stack Builder in the PostgreSQL 9.2 folder in the Windows Start menu.

StackBuilder usually recognizes your installed versions of PostgreSQL and offers to install pgAgent between the various programs in the Add-ons, tools and utilities category. Once you check pgAgent and proceed with the installation, it will download it and start configuring it. The installation phase includes starting the necessary SQL statements and installing the PostgreSQL scheduling Agent - pgAgent windows. If this step is successful, there is nothing more to do, the functionality will be available in pgAdmin for creating tasks.

What is misleading in the docs

The latest pgAdmin docs at http://www.pgadmin.org/docs/1.16/pgagent-install.html have a Service Installation on Windows that says:

The service can be installed quite simply from the command line, because (setting the path as necessary):

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

However, in most cases this will not help, because:

  • The pgAgent installation is performed by the pgAgent installation launched by StackBuilder, and this step is not required.
  • or you only have pgAdmin and pgagent.exe will not be installed, so this step is not possible.
+26
source

I already installed PostgreSQL, but without pgAdmin. I got * tag.gz and unpacked it using 7-Zip. What are the next steps?

I googled a lot, and I still donโ€™t know that I am doing a worg. Can someone please write step by step what I need to do.

0
source

pgAdmin will be successfully installed after downloading the compressed file from

https://www.pgadmin.org/download/pgagent-source-code/

there inside you will find the file "sql \ pgagent.sql"

Drop the contents of this file into the Query Tool and run it. This will install pgAgent. Refresh the database connection to see the result. The pgAgent Jobs tab should have been created at the root level for your connection.

There is no need to use the INSTALL command from the command line.

0
source

Source: https://habr.com/ru/post/949101/


All Articles