Re: pgagent

From: Gabi Draghici <gabi(dot)draghici(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pgagent
Date: 2020-11-07 12:17:37
Message-ID: CAGUZLHxr+f84cf8paYfcPLUgpmtVZGP6UzqfCaM3SmAaP9yaHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

My bad !
I didn't read the documentation too well ... and completed the 'Host agent'
with the IP instead of the hostname !
The job it's running now.
Thank you for help !

Regards,
Gabriel

On Sat, Nov 7, 2020 at 1:29 PM Gabi Draghici <gabi(dot)draghici(at)gmail(dot)com>
wrote:

>
> I don't think that most of them are related to pgagent, since they are
> coming anyway (I suppose it's about pgadmin's Dashboard).
> There is just one that I think it's about "Run now" :
>
> ... EET postgres postgres [2104]LOG: statement: UPDATE
> pgagent.pga_job SET jobnextrun=now()::timestamptz WHERE jobid=1::integer
>
> but that's just about it !
> Is there any way I can test that pgagent it's able to start a job ?
>
> Regards,
> Gabi
>
>
>
>
>
>
> On Fri, Nov 6, 2020 at 6:41 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
> wrote:
>
>> On 11/6/20 8:12 AM, Gabi Draghici wrote:
>> >
>> > It't not a daemon yet (I started manually) but yes, it's running :
>> >
>> > postgres(at)dbdocs:~> ps aux | grep postgresql
>> > postgres 2093 0.0 0.3 8720088 218280 ? Ss 17:54 0:00
>> > /usr/lib/postgresql12/bin/postgres -D /opt/postgresql/database
>> > postgres 2315 0.0 0.0 64664 5708 pts/2 S 17:57 0:00
>> > /usr/bin/postgresql12-pgagent hostaddr=10.1.0.4 dbname=postgres
>> > user=pgagent -s /opt/postgresql/pglog/pg_agent.log
>> > postgres 2326 0.0 0.0 8696 820 pts/2 S+ 17:57 0:00 grep
>> > --color=auto postgresql
>>
>> >
>> > I've switched log_statement to 'all' and restarted the DB. All I see
>> > it's a bunch of statements like these :
>> >
>> > 2020-11-06 18:07:03.869 EET postgres pgagent [2316]LOG: statement:
>> > SELECT J.jobid FROM pgagent.pga_job J WHERE jobenabled AND
>> > jobagentid IS NULL AND jobnextrun <= now() AND (jobhostagent = ''
>> > OR jobhostagent = 'dbdocs-prd') ORDER BY jobnextrun
>> > 2020-11-06 18:07:04.466 EET postgres postgres [2104]LOG: statement:
>> > /*pga4dash*/
>>
>> The above is from when you click 'Run now'?
>>
>> >
>> > Regards,
>> > Gabi
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>> --
>> Adrian Klaver
>> adrian(dot)klaver(at)aklaver(dot)com
>>
>

In response to

  • Re: pgagent at 2020-11-07 11:29:17 from Gabi Draghici

Browse pgsql-general by date

  From Date Subject
Next Message Leandro Guimarães 2020-11-07 17:28:09 pg_bulkload sequential
Previous Message Gabi Draghici 2020-11-07 11:29:17 Re: pgagent