Re: pgAgent on Macbook

Lists: pgadmin-support
From: Poonam Nijhawan <pnijhawan(at)greenplum(dot)com>
To: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: pgAgent on Macbook
Date: 2009-06-04 04:43:55
Message-ID: 2106D8DC89010842BABA5CD03FEA4061C9FD4818@EXVMBX018-10.exch018.msoutlookonline.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-support

Hi Support,

I have installed pgagent on my Macbok version 10.5.7. It's running on Postgres version 8.2.10. I created the schema and I was able to see jobs node there.

I have not started any daemon as I don't know how to do that.

Could you please provide some instruction on how can I get the pgagent running on my MAC Book. Please let me know if there is a document that I need to follow.

I understand that for Linux, there is a separate binary pgAgent-3.0.0-Linux.tar.gz‎ (415 KB‎)

Do we have anything of this sort for MAC. pgagent worked fine on Windows which is a 32 bit operating system, how about MAC since it is a 64 bit Operating System.

Please guide on this.

Regards
Poonam


From: Poonam Nijhawan <pnijhawan(at)greenplum(dot)com>
To: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: pgAgent on Macbook
Date: 2009-06-04 04:47:04
Message-ID: 2106D8DC89010842BABA5CD03FEA4061C9FD4819@EXVMBX018-10.exch018.msoutlookonline.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-support

Hi Support,

I have installed pgagent on my Macbok version 10.5.7. It's running on Postgres version 8.2.10. I created the schema and I was able to see jobs node there.

I have not started any daemon as I don't know how to do that.

Could you please provide some instruction on how can I get the pgagent running on my MAC Book. Please let me know if there is a document that I need to follow.

I understand that for Linux, there is a separate binary pgAgent-3.0.0-Linux.tar.gz‎ (415 KB‎)

Do we have anything of this sort for MAC. pgagent worked fine on Windows which is a 32 bit operating system, how about MAC since it is a 64 bit Operating System.

Please guide on this.

Regards
Poonam


From: Dave Page <dpage(at)pgadmin(dot)org>
To: Poonam Nijhawan <pnijhawan(at)greenplum(dot)com>
Cc: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: pgAgent on Macbook
Date: 2009-06-04 08:02:36
Message-ID: 937d27e10906040102i732c19cfn36a595f9a3fbdf01@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-support

2009/6/4 Poonam Nijhawan <pnijhawan(at)greenplum(dot)com>:
> Hi Support,
>
> I   have installed pgagent on my Macbok version 10.5.7. It's running on Postgres version 8.2.10.  I created the schema and I was able to see jobs node there.
>
> I have not started any daemon as I don't know how to do that.
>
> Could you please provide some instruction on how can I get the pgagent running on my MAC Book. Please let me know if there is a document that I need to follow.

We have no documentation on that as this problem is very OS specific.
I'd suggest Googling for information on creating a launch daemon,
which should work fine - an un-tested plist file might look like
(substitute the variables for real values):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>com.edb.launchd.pgagent</string>
<key>ProgramArguments</key>
<array>
<string>$INSTALL_DIR/bin/pgagent</string>
<string>-f</string>
<string>-l1</string>
<string>-s</string>
<string>/var/log/pgagent.log</string>
<string>host=$PG_HOST</string>
<string>port=$PG_PORT</string>
<string>dbname=$PG_DATABASE</string>
<string>user=$PG_USER</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>postgres</string>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
</dict>
</plist>

> I understand that for Linux, there is a separate binary  pgAgent-3.0.0-Linux.tar.gz‎ (415 KB‎)

As there is for Mac:
http://wwwmaster.postgresql.org/download/mirrors-ftp/pgadmin3/release/pgagent/pgAgent-3.0.0-Darwin.tar.gz

> Do we have anything of this sort for MAC. pgagent worked fine on Windows which is a 32 bit operating system, how about MAC since it is a 64 bit Operating System.

OS X on any Mac Book will be 32 bit iirc.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com


From: Dave Page <dpage(at)pgadmin(dot)org>
To: Poonam Nijhawan <pnijhawan(at)greenplum(dot)com>
Cc: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: pgAgent on Macbook
Date: 2009-06-05 13:25:22
Message-ID: 937d27e10906050625t65770706n62292a470f1d8dc1@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgadmin-support

2009/6/5 Poonam Nijhawan <pnijhawan(at)greenplum(dot)com>:
> Hi There,
>
> I am managed to install pgagent on my mac book. I could see the pgagent process running. I have attached the screenshots for the same.
>   root# ps -eaf | grep pgagent
>    0 12627     1   0   0:00.01 ttys000    0:00.01 pgagent -l 1 dbname=postgres user=postgres
>    0 12650 45330   0   0:00.00 ttys000    0:00.00 grep pgagent
>
> But when I am clicking on "run now " on job node to execute the job in the statistics window it shows running but in the background it throws following error:-
>
>
> root# The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
> Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

Start pgagent with the -f option. It seems that fork without exec
doesn't play nicely in Leopard.

You need -f anyway, when starting using launchd, as launchd process
shouldn't fork/exec as launchd can think they've died and restart.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com