prioritize
pg_prioritize : get and set the priority of PostgreSQL backends
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 5100 | prioritize | pg_prioritize | 1.0.4 |
ADMIN | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | plan_filter pg_kpart pg_readonly qos block_copy_command safeupdate pg_command_fw pg_strict pg_hint_plan |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PGDG | 1.0.4 |
18 17 16 15 14 | pg_prioritize |
- |
| RPM | PGDG | 1.0.4 |
18 17 16 15 14 | pg_prioritize_$v |
- |
| DEB | PGDG | 1.0.4 |
18 17 16 15 14 | postgresql-$v-prioritize |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| el8.aarch64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| el9.x86_64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| el9.aarch64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| el10.x86_64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| el10.aarch64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| d12.x86_64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| d12.aarch64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| d13.x86_64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| d13.aarch64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| u22.x86_64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| u22.aarch64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| u24.x86_64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| u24.aarch64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| u26.x86_64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
| u26.aarch64 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 | PGDG 1.0.4 |
Source
github.com/schmiddy/pg_prioritize
Install
Make sure PGDG repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
prioritize exposes operating-system priority controls for PostgreSQL backend processes. Use it to lower the scheduling priority of selected sessions; it is not a PostgreSQL query scheduler.
Inspect and Adjust a Backend
Any user may query a backend’s priority. A PostgreSQL superuser may request adjustments for any backend; other users may adjust only backends running under the same database role.
Adjust Related Sessions
Increasing the numeric nice value lowers operating-system scheduling priority. The example therefore reduces those backends’ priority, rather than speeding them up.
Privileges and Limits
Installation requires a superuser, with no preload or restart. Operating-system permissions still apply: ordinary PostgreSQL processes normally cannot lower the numeric nice value to increase priority. Database superuser privileges do not confer root privileges. Review platform scheduling policy and process identity before using bulk adjustments. The control file uses SQL version 1.0; distribution package version 1.0.4 is separate.