Re: PG_Cron - Error Message Connection failed

From: FOUTE K(dot) Jaurès <jauresfoute(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Fabricio Pedroso Jorge <fpjbito(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: PG_Cron - Error Message Connection failed
Date: 2023-05-15 11:58:55
Message-ID: CAHQ1jffwyXJfC7-3J8T0Qy7QWhaGkJ0Ar74JBk_kDK587ta=zQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le lun. 15 mai 2023 à 05:12, FOUTE K. Jaurès <jauresfoute(at)gmail(dot)com> a
écrit :

>
>
> Le dim. 14 mai 2023 à 21:12, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> a
> écrit :
>
>> On 5/14/23 13:04, FOUTE K. Jaurès wrote:
>> >
>> >
>> > Le dim. 14 mai 2023 à 16:12, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
>> > <mailto:adrian(dot)klaver(at)aklaver(dot)com>> a écrit :
>>
>> >
>> > Not what was requested.
>> >
>> > In the post linked to here:
>> >
>> >
>> https://www.postgresql.org/message-id/CAHQ1jffWF7Y8c1X7EK3JvbLJgw1GEcVk0uPa3%2B0CJo4h8PFHVw%40mail.gmail.com
>> <
>> https://www.postgresql.org/message-id/CAHQ1jffWF7Y8c1X7EK3JvbLJgw1GEcVk0uPa3%2B0CJo4h8PFHVw%40mail.gmail.com
>> >
>> >
>> > there was an image of the result of:
>> >
>> > SELECT cron.schedule( 'TEST','30 seconds', $$SELECT 1$$);
>> >
>> > Provide that result as text.
>> >
>> > jobid | schedule | command | nodename | nodeport |
>> > database | username | active | jobname
>> >
>> -------+------------+----------+-----------+----------+--------------------------------------------+----------+--------+---------
>> > 8 | 30 seconds | SELECT 1 | localhost | 5692 | databasename |
>> > postgres | t | TEST
>> > (1 row)
>>
>> That is not the same result as in the image, it had additional fields:
>> runid, job_pid, status, return_message, start_time.
>>
> Okay, Understands now, this result come from cron.job_run_details that
> show the status of running job
> Select * from cron.job_run_details where jobid =8 order by runid desc
> limit 5
> jobid | runid | job_pid | database |
> username | command | status | return_message | start_time | end_time
>
> -------+-------+---------+--------------------------------------------+----------+----------+--------+-------------------+------------+----------
> 8 | 9276 | | inov_victoria_v71_rdec21_00_ibackuppro_rep |
> postgres | SELECT 1 | failed | connection failed | |
> 8 | 9275 | | inov_victoria_v71_rdec21_00_ibackuppro_rep |
> postgres | SELECT 1 | failed | connection failed | |
> 8 | 9274 | | inov_victoria_v71_rdec21_00_ibackuppro_rep |
> postgres | SELECT 1 | failed | connection failed | |
> 8 | 9272 | | inov_victoria_v71_rdec21_00_ibackuppro_rep |
> postgres | SELECT 1 | failed | connection failed | |
> 8 | 9271 | | inov_victoria_v71_rdec21_00_ibackuppro_rep |
> postgres | SELECT 1 | failed | connection failed | |
> (5 rows)
>
>>
>> Also the database field had not been edited. In the original image it
>> looks like there was multiple databases named. From what I understand of
>> pg_cron a job can only run on one database at a time.
>>
> No, it's just one database.
>
>>
>> --
>> Adrian Klaver
>> adrian(dot)klaver(at)aklaver(dot)com
>>
>>
>
> --
> Jaurès FOUTE
>

Hello @Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> .
I've just finished a test on PostgreSQL 14 and everything works as expected.

--
Jaurès FOUTE

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fabrice Chapuis 2023-05-15 15:41:47
Previous Message Thomas Kellerer 2023-05-15 09:00:40 Re: function signature allow "default" keyword