Re: pgagent and pg_service.conf

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Dirk-Jan Faber <dfaber(at)gmail(dot)com>
Cc: pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: pgagent and pg_service.conf
Date: 2014-12-17 09:26:49
Message-ID: CA+OCxozGYRqOP-0dr-GPDQn5KRAMA6LwNKUkGxP30Qq+wJABwA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Tue, Dec 16, 2014 at 10:17 AM, Dirk-Jan Faber <dfaber(at)gmail(dot)com> wrote:
>
> Hello,
>
> I am just starting with pgagent. First thing I noticed was that it does
> not work with pg_service.conf. The installation documentation on
> http://www.pgadmin.org/docs/dev/pgagent-install.html refers to
> http://www.postgresql.org/docs/current/static/libpq.html#libpq-connect
> for more information on the connection string.
> That gave me the impression that the library that handles the connection
> string is shared between postgresql and pgagent.
> So my question is wether or not the use of pg_service.conf is somewhere on
> the roadmap of pgagent and, if not, it can be put on the roadmap. This
> would save the trouble of having to maintain 2 files with the same
> information.
>
> $ pgagent_93 -f service=oaddev
> ERROR: Primary connection string is not valid!
> $ pgagent_93 -f hostaddr=pg-dev dbname=oad user=oaddev
> ERROR: Could not find the table 'pgagent.pga_job'. Have you run
> pgagent.sql on this database?
>
> (I know the last one gives an error right now, but at least it connects).
>
> I am using pgagent_93 on rhel6 (from
> http://yum.postgresql.org/9.3/redhat/rhel-6.6-x86_64/):
> $ rpm -qf $(which pgagent_93)
> pgagent_93-3.4.0-1.rhel6.x86_64
>
>
It does use the same library to handle the connection, but pgAgent also
needs to be able to parse and modify the connection string itself, for
example, to connect to different databases. I don't think it would be
feasible to use pg_service.conf, as pgAgent wouldn't be able to tell how to
connect to a different database on the same server, unless we also add the
ability for it to read and parse the pg_service.conf file itself.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Dirk-Jan Faber 2014-12-17 10:47:08 Re: pgagent and pg_service.conf
Previous Message David G Johnston 2014-12-17 07:55:14 Re: pg_proc?