should pg_cron be on v1.6.4 ?

getting a security warning about pg_cron not being on 1.6.4? I dont see anyway to update it etc?
23 Replies
garyaustin
garyaustin2mo ago
extensions are updated by update the Postgres version in the infrastructure tab. I see 1.6 as the latest though in my updated project. Wait. I just noticed there is a new upgrade. I'll see if that bumps cron. Nope still at 1.6 This postgres/extension version check is something new they just added and seems not ready for primetime.
David.Stanton
David.StantonOP2mo ago
so its a version behind what it should be then
garyaustin
garyaustin2mo ago
Not sure if there is a security issue or just the linter flagging. But nothing you can do to upgrade if you are on Supabase latest Postgres version. I flagged them as yesterday it was flagging postgres versions as a security issue but was on latest. They took care of that one. 1.6.4 has been out over a year. Also a bit strange the version shown in supabase is not 1.6.0 but just 1.6. Not sure if that has some meaning or not. @David.Stanton try disabling and then re-enabling the extension. Mine then went from 1.6 to 1.6.4 on latest Postgres version.
David.Stanton
David.StantonOP2mo ago
@garyaustin but that delete all my jobs that are runnings, its not really a fix
garyaustin
garyaustin2mo ago
OK here is another approach... ALTER EXTENSION pg_cron UPDATE; This is actually what the security advisor docs recommend. Did not know they existed. https://supabase.com/docs/guides/database/database-advisors?queryGroups=lint&lint=0022_extension_versions_outdated#why-keep-extensions-updated They made a change at some point to not upgrade automatically for extensions. So now they have the older versions still around and then you have to manually upgrade if you have the newer version installed in the system by a Postgres upgrade.
David.Stanton
David.StantonOP2mo ago
ERROR: 22023: extension "pg_cron" has no update path from version "1.6" to version "1.6.4"
garyaustin
garyaustin2mo ago
Did you upgrade your Postgres?
David.Stanton
David.StantonOP2mo ago
errr, ye, or i would have made the post to start with? lol
garyaustin
garyaustin2mo ago
I was dealing with two of you on a similar thing. The other user we went thru that extensions are carried in the Postgres version and you need to be on the latest from the infrasctructure tab.
garyaustin
garyaustin2mo ago
No description
garyaustin
garyaustin2mo ago
No description
David.Stanton
David.StantonOP2mo ago
No description
No description
David.Stanton
David.StantonOP2mo ago
@garyaustin any other ideas here. I think SB need to make a proper fix?
garyaustin
garyaustin2mo ago
Sorry no as it is upgraded for me. Turning off and on seems for sure to do it. I could not produce the no upgrade path error, but don't have any old instances to attempt the alter update. All new instances come with it default. The latest postgres version you can upgrade to in infra also includes it. So it is a matter of why upgrade does not work for you. Run this in SQL editor:
select * from pg_available_extensions where name = 'pg_cron';
select * from pg_available_extensions where name = 'pg_cron';
David.Stanton
David.StantonOP2mo ago
[ { "name": "pg_cron", "default_version": "1.6.4", "installed_version": "1.6", "comment": "Job scheduler for PostgreSQL" } ]
garyaustin
garyaustin2mo ago
So you do have it.
David.Stanton
David.StantonOP2mo ago
no
garyaustin
garyaustin2mo ago
Not sure why update did not work for you. Your system has it available. So update should work.
David.Stanton
David.StantonOP2mo ago
No description
garyaustin
garyaustin2mo ago
Otherwise copying your cron job details and restoring them after turning off and cron is it. I believe you as you got that before. But that does not make sense as there is an upgrade path as you have it. Your other option is to contact support or generate an issue in supabase/supabase issues.
David.Stanton
David.StantonOP2mo ago
its a noddy fix, not a "real" fix though, if there was a "export" cron jobs and a import, maybe "sort of accetible" by there is not
garyaustin
garyaustin2mo ago
Updating should work, not sure why it is not for you. That is the documented way and I did that. I don't think update gits rid of the tables.
But turning off and on will. At this point if you can't do that then you'll have to ask Supabase thru support or issues. I don't have any other suggestions and have no way to play with upgrading now.
David.Stanton
David.StantonOP2mo ago
GitHub
bug around pg_cron not updating · Issue #38679 · supabase/supabase
there seems to be a bug when on version 17.6.1.003 , security advisor throws a "Issue Extension pg_cron is using version 1.6 but version 1.6.4 is available. Using outdated extension versions m...

Did you find this page helpful?