Thread: [pgagent]: Modified 'next_schedule' function and updated pgagent 4.2 version
Hi,
Please find an updated patch that fixes a bug in 'next_schedule' function where minute should be extracted instead of year for calculation.
Issue found by: Vik Fearing
Please find the attached patch that fixed the issue in respective pgagent files and updated pgagent for 4.2 version.
Do review it and let me know for comments.
Thanks,
Neel Patel
Attachment
Re: [pgagent]: Modified 'next_schedule' function and updated pgagent4.2 version
From
Dave Page
Date:
Hi
On Thu, Apr 23, 2020 at 12:21 PM Neel Patel <neel.patel@enterprisedb.com> wrote:
Hi,Please find an updated patch that fixes a bug in 'next_schedule' function where minute should be extracted instead of year for calculation.Issue found by: Vik FearingPlease find the attached patch that fixed the issue in respective pgagent files and updated pgagent for 4.2 version.Do review it and let me know for comments.
Any reason not to use the rewritten version of the function that Vik wrote? It updated it to use much more modern features of pl/pgsql, rather than the now 15 year old syntax that's currently used.
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: [pgagent]: Modified 'next_schedule' function and updated pgagent4.2 version
From
Vik Fearing
Date:
On Fri, Apr 24, 2020 at 11:10 AM Dave Page <dpage@pgadmin.org> wrote:
HiOn Thu, Apr 23, 2020 at 12:21 PM Neel Patel <neel.patel@enterprisedb.com> wrote:Hi,Please find an updated patch that fixes a bug in 'next_schedule' function where minute should be extracted instead of year for calculation.Issue found by: Vik FearingPlease find the attached patch that fixed the issue in respective pgagent files and updated pgagent for 4.2 version.Do review it and let me know for comments.Any reason not to use the rewritten version of the function that Vik wrote? It updated it to use much more modern features of pl/pgsql, rather than the now 15 year old syntax that's currently used.
Well, the current version has received 15 years of testing (despite the bug I found), and my rewrite has only received some local testing by me. I would like to see my version eventually integrated, but I don't think it should be rushed in.
Vik Fearing
Re: [pgagent]: Modified 'next_schedule' function and updated pgagent4.2 version
From
Dave Page
Date:
On Fri, Apr 24, 2020 at 10:23 AM Vik Fearing <vik.fearing@enterprisedb.com> wrote:
On Fri, Apr 24, 2020 at 11:10 AM Dave Page <dpage@pgadmin.org> wrote:HiOn Thu, Apr 23, 2020 at 12:21 PM Neel Patel <neel.patel@enterprisedb.com> wrote:Hi,Please find an updated patch that fixes a bug in 'next_schedule' function where minute should be extracted instead of year for calculation.Issue found by: Vik FearingPlease find the attached patch that fixed the issue in respective pgagent files and updated pgagent for 4.2 version.Do review it and let me know for comments.Any reason not to use the rewritten version of the function that Vik wrote? It updated it to use much more modern features of pl/pgsql, rather than the now 15 year old syntax that's currently used.Well, the current version has received 15 years of testing (despite the bug I found), and my rewrite has only received some local testing by me. I would like to see my version eventually integrated, but I don't think it should be rushed in.
Good point - patch applied, thanks.
Thanks!
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: [pgagent]: Modified 'next_schedule' function and updated pgagent4.2 version
From
Neel Patel
Date:
Hi Dave,
On Fri, Apr 24, 2020 at 3:00 PM Dave Page <dpage@pgadmin.org> wrote:
On Fri, Apr 24, 2020 at 10:23 AM Vik Fearing <vik.fearing@enterprisedb.com> wrote:On Fri, Apr 24, 2020 at 11:10 AM Dave Page <dpage@pgadmin.org> wrote:HiOn Thu, Apr 23, 2020 at 12:21 PM Neel Patel <neel.patel@enterprisedb.com> wrote:Hi,Please find an updated patch that fixes a bug in 'next_schedule' function where minute should be extracted instead of year for calculation.Issue found by: Vik FearingPlease find the attached patch that fixed the issue in respective pgagent files and updated pgagent for 4.2 version.Do review it and let me know for comments.Any reason not to use the rewritten version of the function that Vik wrote? It updated it to use much more modern features of pl/pgsql, rather than the now 15 year old syntax that's currently used.Well, the current version has received 15 years of testing (despite the bug I found), and my rewrite has only received some local testing by me. I would like to see my version eventually integrated, but I don't think it should be rushed in.Good point - patch applied, thanks.Neel, can you work with the team to do some testing of the function rewrite as a spare-time project please?
Sure.
Thanks!--Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company