Refactor functions to use SPI instead of heap specific functions#435
Refactor functions to use SPI instead of heap specific functions#435za-arthur wants to merge 1 commit into
Conversation
Functions `cron_unschedule`, `cron_unschedule_named`, `LoadCronJobList` used heap specific functions to select or modify records which fails if pg_cron tables are created using table access method other than `heap`.
|
@microsoft-github-policy-service agree |
|
Any specific concerns with the heao functions or just general consistency? |
|
@sfc-gh-mslot thank you for checking the PR and sorry that I didn't include the motivation in the description in the first place. We encountered the issue with The PR addresses this by replacing heap specific functions (which are used to access non-system tables, system catalog tables are heap tables and I understand that there are not much TAM implementations for Postgres out there. But supporting potential future TAMs and orioledb would be a nice improvement. |
Functions
cron_unschedule,cron_unschedule_named,LoadCronJobListused heap specific functions to select or modify records which fails if pg_cron tables are created using table access method other thanheap.This PR refactors that functions to use SPI (similar to other places like
ScheduleCronJob) instead of direct call ofsystable_beginscanandsimple_heap_deletefunctions, which are heap specific.There are few
systable_beginscancalls left which are used to scan system tables, but this is intentional.