Repository navigation
Restrict changing the job config check function to the job owner - #10988
Merged
Merged
Conversation
|
@akuzm, @kpan2034: please review this pull request.
|
akuzm
approved these changes
Nov 10, 2026
melihmutlu
approved these changes
Nov 10, 2026
Codecov Reportβ All modified and coverable lines are covered by tests. π’ Thoughts on this report? Let us know! |
The config check function of a job is called whenever the job row is updated with a config. The background worker does this when a failing job reaches max_retries, and there it runs with the privileges of the job owner. The database owner is allowed to alter any job to adjust scheduling. Until now this also allowed the database owner to register a check function on a job owned by another role, including the default jobs owned by the installing superuser, and have the worker run it as that role. alter_job now requires the caller to have the privileges of the job owner when check_config is passed. All other alter_job settings stay available to the database owner. The EXECUTE privilege on the check function is now verified for the job owner, as add_job already does.
svenklemm
force-pushed
the
sven/check_config
branch
from
November 10, 2026 12:28
3ff46cb to
84991b5
Compare
A job config can lose a required key, for example when alter_job is called with config_merge and a null value. The policy check functions reported this with the internal error code, which marks it as a bug. Use the JSON member not found error code instead, as the other config lookups already do.
svenklemm
force-pushed
the
sven/check_config
branch
from
November 10, 2026 13:00
84991b5 to
471fde9
Compare
Merged
surister
added a commit
that referenced
this pull request
Nov 11, 2026
This release includes security fixes, performance improvements, and bug fixes since 2.31.0. As part of our ongoing proactive security reviews, this release includes a larger set of security fixes than usual. We recommend that you upgrade as soon as possible. **Loader Changes** For the loader changes take effect a PostgreSQL restart is required. * [#10966](#10966) Check database ownership before stopping or restarting background workers on database commands * [#10983](#10983) Run the background worker scheduler as the database owner instead of as superuser **Features** * [#10864](#10864) Improve continuous aggregate refresh performance by updating the watermark once per batch * [#10878](#10878) Enable Adaptive Integer Compression (AIC) by default * [#10927](#10927) Remove user switching when allocating ids from the internal catalog sequences * [#10953](#10953) Allow database owners to start, stop, and restart background workers without superuser * [#10960](#10960) Run the telemetry job as the database owner instead of the role that installed the extension **Bugfixes** * [#10075](#10075) Removing the bloom1_contains function and rejecting anonymous record arrays in bloom1_contains_any * [#10296](#10296), [#10745](#10745) Fix continuous aggregate refresh skipping the last invalidated bucket for variable-sized buckets * [#10854](#10854) Correctly skip rows with conversion errors during `COPY FROM ON_ERROR` ignore * [#10855](#10855) Enforce `REJECT_LIMIT` during `COPY FROM` on PostgreSQL 18 and later * [#10887](#10887) Fix "repalloc called with invalid pointer" when compressing batches of more than 992 rows for certain data patterns * [#10893](#10893) Fix typo in the columnar README example * [#10902](#10902) Fix concurrent `UPDATE`/`DELETE` on hypertables silently skipping rows under `READ COMMITTED` * [#10919](#10919) Check schema `CREATE` privilege when creating a continuous aggregate * [#10925](#10925) Create chunk constraints without switching to the catalog owner * [#10961](#10961) Fix crash in `decompress_chunk` when the hypertable is dropped concurrently * [#10961](#10961) Fix null dereference in in-memory recompression when the compression settings are missing * [#10961](#10961) Fix stale chunk and hypertable state in `compress_chunk` when a concurrent decompress or compression change commits * [#10962](#10962) Reset `search_path` after every `COMMIT` in the columnstore policy * [#10964](#10964) Fix crash in `cagg_validate_query` when called with a `SELECT INTO` statement * [#10964](#10964) Fix crash in `cagg_validate_query` when the user lacks `SELECT` permission on the hypertable * [#10965](#10965) Verify the server certificate on telemetry SSL connections * [#10967](#10967) Fix crash in `show_policies` when called more than once in the same query * [#10968](#10968) Fix crash in `add_policies` and `alter_policies` when a `drop_created_before` retention policy exists on the hypertable or the continuous aggregate * [#10970](#10970) Fix `ORDER BY` pushdown for realtime continuous aggregates with an `ORDER BY` in their definition * [#10988](#10988) Report a missing policy config key as a user error instead of an internal error * [#10988](#10988) Restrict changing the config check function of a job to the job owner * [#10989](#10989) Match job procedures by OID in DDL hooks * [#10991](#10991) Fix function overload in `approximate_row_count` * [#10993](#10993) Require ownership of the chunk, not just of the hypertable, to do chunk operations on them **GUCs** * `compression_orderby_default_function`: Function to use for calculating default order_by setting for compression. Default: `timescaledb.compression_orderby_default_function` * `compression_segmentby_default_function`: Function to use for calculating default segment_by setting for compression. Default: `timescaledb.compression_segmentby_default_function` **Thanks** * @JoongHyuk-Shin for fixing continuous aggregate refresh skipping the last invalidated bucket for variable-width buckets, [10419](#10419) * @manishnithinreddy for reporting the concurrent `UPDATE`/`DELETE` regression and bisecting it to `2.28.1`, [10902](#10902) * @martin-omacht for reporting missing and stale buckets in a continuous aggregate with a timezone, [#10296](#10296) * @owhiterabbito for reporting the compression error and analyzing the selector buffer size, [#10887](#10887) * @pei711 for fixing a typo in the README, [#10893](#10893) * @salmanazmat666 for reporting the continuous aggregate refresh skipping the last bucket on a variable-width bucket boundary, [#10745](#10745)
8 tasks done
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.
The config check function of a job is called whenever the job row is
updated with a config. The background worker does this when a failing
job reaches max_retries, and there it runs with the privileges of the
job owner.
The database owner is allowed to alter any job to adjust scheduling.
Until now this also allowed the database owner to register a check
function on a job owned by another role, including the default jobs
owned by the installing superuser, and have the worker run it as that
role.
alter_job now requires the caller to have the privileges of the job
owner when check_config is passed. All other alter_job settings stay
available to the database owner. The EXECUTE privilege on the check
function is now verified for the job owner, as add_job already does.
Disable-check: commit-count