Re: Can i write a time-trigger?

Поиск
Список
Период
Сортировка
От Jure Kobal
Тема Re: Can i write a time-trigger?
Дата
Msg-id 200911181611.17349.j.kobal@gmx.com
обсуждение исходный текст
Ответ на Re: Can i write a time-trigger?  (Shruthi A <shruthi.iisc@gmail.com>)
Ответы Re: Can i write a time-trigger?
Список pgsql-admin
> -- I connected to the 'postgres' database in my pgAdmin and ran the
> pgagent.sql file.  It claimed to have created a schema called 'pgagent' and
> a lot of tables inside it. When i try to run the sql file again, it tells
>  me the elements already exist.  But i couldn't see either the schema or
>  these tables anywhere.  Where did they go?

You can find it inside Catalogs if you're using pgAdmin.

> -- While running the pgagent daemon, what dbname should i specify? Is it
> postgres or pgadmin (as the example in
> http://www.enterprisedb.com/docs/en/8.3/tools/pgadmin/1.8.2/pgagent-install
> .html) ?

postgres. Since that is the database, pgagent is only a schema inside it.

> -- I created a stored proc in another database and want to schedule a call
> to this proc.  Am i allowed to do this? Since postgres doesnt allow
> cross-database references.  But i didnt find any error msg indicating this.

When you create a new step inside a job you have to specify the databse in
which the step should be executed. With that you then can use only tables,
functions and stuff in that databse since everything else will give you an
error.

> -- I managed to create a 'Job' in pgAdmin with the Definition specifying a
> call to my stored proc (without referencing the database).   But the
> 'schedule' here doesnt seem to accept any start date other than "1st jan
> 1970"!  And it selects some random start time which i again have no control
> on. Why is this?  The calender is brought up when we click on a very narrow
> strip inside the 'date' field, where apparently the arrow-mark should have
> been.  And the OK button in the Schedule dialog always seems to be greyed
> out but strangely responds to the 'Enter' key!

How did you manage this? When you select SQL as the type of the step it won't
let you create the step without the database name.
But for some reason what you described about the date field reminds me of some
problems I had. Since that time I first create an empty job(no steps or
schedules) and create them later. That way I had no problems and everything
works as it should.
I think the start date is important only if the job should start executing
sometime in the future else you just set what you want inside the "Days" and
"Times" tabs.
About the OK button, have to say I don't know what it could be.

> -- Ok, i really dont mind the start date, and i managed to schedule it
>  daily as i wanted.  But why does it require me to click on 'Run now' even
>  after the daemon is running and i've added a properly scheduled job?

> -- Is there no command line interface for pgagent?  That would be nice
>  since the GUI doesnt seem to be stable and doesnt throw useful error
>  messages when there is a problem.

Put them together since the're somehow related.
Is pgAgent running in the background and is it connected to the right
database?
If you wan't to debug it you can run it with "-f" and "-l 2". With that it
will run in foreground(-f) and debug mode(-l 2). That way you can see what
it's doing.

Hope I was able to answer some of your questions.

--
Regards,
Jure Kobal

В списке pgsql-admin по дате отправления:

Предыдущее
От: Shruthi A
Дата:
Сообщение: Re: Can i write a time-trigger?
Следующее
От: Shruthi A
Дата:
Сообщение: Re: Can i write a time-trigger?