From: | Mike Christensen <mike(at)kitchenpc(dot)com> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Need some help setting up pgAgent |
Date: | 2010-10-18 10:45:32 |
Message-ID: | AANLkTikn0GN-HoBnxg_LBs+7t-Q0oLZBLfTYvX1tjWj7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Oct 18, 2010 at 3:37 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> On Mon, Oct 18, 2010 at 11:34 AM, Mike Christensen <mike(at)kitchenpc(dot)com> wrote:
>> On Mon, Oct 18, 2010 at 3:07 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>> On Mon, Oct 18, 2010 at 10:46 AM, Mike Christensen <mike(at)kitchenpc(dot)com> wrote:
>>>> Okay I found one that I can use..
>>>>
>>>> One question.. Should the connection string in the script have the
>>>> password for "root" hard coded in it? Or will it use a password from
>>>> ~/.pgpass automatically? If so, what user account will it find the
>>>> .pgpass file under? Thanks!
>>>
>>> Have the script start pgagent under the postgres account eg;
>>>
>>> su - postgres -c 'p/path/to/pgadmin....'
>>>
>>> Then it should be able to use postgres' pgpass file. Don't put the
>>> password in the connection string!
>>
>> Ok, that worked.. I can at least start and stop it now, and it
>> remains running when I'm logged off..
>>
>> So does anything in /etc/init.d get automatically run when the server boots?
>
> No, you have to enable it. On redhat based distros, you'd do something
> like "chkconfig <servicename> on". On Debian based distros, I believe
> you use the update-rc.d command.
Well, I guess that worked:
etc/init.d# update-rc.d pgagent defaults
Adding system startup for /etc/init.d/pgagent ...
/etc/rc0.d/K20pgagent -> ../init.d/pgagent
/etc/rc1.d/K20pgagent -> ../init.d/pgagent
/etc/rc6.d/K20pgagent -> ../init.d/pgagent
/etc/rc2.d/S20pgagent -> ../init.d/pgagent
/etc/rc3.d/S20pgagent -> ../init.d/pgagent
/etc/rc4.d/S20pgagent -> ../init.d/pgagent
/etc/rc5.d/S20pgagent -> ../init.d/pgagent
Thanks!
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Kupershmidt | 2010-10-18 14:12:19 | Re: How to change pg_trigger query so that it works in 9.0 without pg_trigger.tgisconstraint does not exist error |
Previous Message | Vincenzo Romano | 2010-10-18 10:41:31 | Hints for trees |