fix(cron): remove unnecessary TRIGGER grant on cron.job_run_details - #2334
Open
utkarash2991 wants to merge 3 commits into
Open
fix(cron): remove unnecessary TRIGGER grant on cron.job_run_details#2334utkarash2991 wants to merge 3 commits into
utkarash2991 wants to merge 3 commits into
Conversation
PostgreSQL Extension Dependency Analysis: PR #2334
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
PostgreSQL Package Dependency Analysis: PR #2334
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
…rom postgres postgres holds ALL privileges on the cron tables, which includes TRIGGER on cron.job_run_details. It does not need to create triggers there, so revoke TRIGGER and stop grant_pg_cron_access() from re-granting it on a later CREATE EXTENSION. cron.job is already SELECT-only for postgres. Regenerates the schema dumps and adds a regression test.
utkarash2991
force-pushed
the
utkarashsingh/psql-1560-revoke-trigger-on-cron-tables
branch
from
July 31, 2026 10:00
2faada6 to
c1a14a9
Compare
za-arthur
approved these changes
Jul 31, 2026
soedirgo
approved these changes
Aug 1, 2026
…-1560-revoke-trigger-on-cron-tables # Conflicts: # nix/checks.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
postgresis grantedALLon the cron tables, which includesTRIGGERoncron.job_run_details. It doesn't need to create triggers on that table, so this revokesTRIGGERoncron.job_run_detailsfrompostgres, stopsgrant_pg_cron_access()from re-granting it onCREATE EXTENSION, and regenerates the schema dumps.cron.jobis alreadySELECT-only forpostgres.Changes
TRIGGERoncron.job_run_details(existing installs) + updategrant_pg_cron_access()so it isn't re-granted onCREATE EXTENSION.after-create.sql: same for new installs.migrations/schema-{15,17,orioledb-17}.sql.pg_cron_trigger_privileges).