pgsql_tweaks
Some functions and views for daily usage
pgsql_tweaks : Some functions and views for daily usage
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 4210 | pgsql_tweaks | pgsql_tweaks | 1.1.0 |
UTIL | PostgreSQL | SQL |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| ----d-r | No | No | No | Yes | yes | no |
| Relationships | |
|---|---|
| Schemas | pgsql_tweaks |
| See Also | pgcalendar pg_math pg_extra_time pg_rrule |
SQL-only.
Packages
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 |
| el8.aarch64 | N/A | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 |
| el9.x86_64 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 |
| el9.aarch64 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 |
| el10.x86_64 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 |
| el10.aarch64 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 | PGDG 1.1.0 |
| d12.x86_64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
| d12.aarch64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
| d13.x86_64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
| d13.aarch64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
| u22.x86_64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
| u22.aarch64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
| u24.x86_64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
| u24.aarch64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
| u26.x86_64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
| u26.aarch64 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 | PIGSTY 1.1.0 |
Source
codeberg.org/pgsql_tweaks/pgsql_tweaks
pgsql_tweaks-1.1.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
pgsql_tweaks 1.1.0 provides DBA-oriented helper functions and views in the pgsql_tweaks schema. The upstream test matrix covers PostgreSQL 14 through PostgreSQL 19rc1; Pigsty packages it for PostgreSQL 14-18.
Enablement
Data Type Check Functions
System Information Functions
Encoding Functions
Aggregate Functions
gap_fill, for filling gaps in time series.array_min,array_max,array_avg, andarray_sum.
Format And Conversion Functions
Utility Functions
System Information Views
pg_db_views,pg_foreign_keys,pg_functions,pg_active_locks.pg_table_matview_infos,pg_object_ownership,pg_partitioned_tables_infos.pg_unused_indexes,pg_bloat_info,pg_table_bloat,pg_missing_indexes.pg_role_permissions,pg_role_infos.
Statistic And Monitoring Views
statistics_top_ten_query_times,top_ten_query_average_time_in_seconds.statistics_top_ten_time_consuming_queries,statistics_top_ten_memory_usage_queries.statistics_top_ten_called_queries,statistics_top_ten_rows_returned_queries.statistics_top_ten_shared_block_hits_queries,statistics_top_ten_wal_records_generated_queries.statistics_query_activity.monitoring_wal,wal_archiving,monitoring_active_locks,monitoring_replication.monitoring_database_conflicts,monitoring_blocked_and_blocking_activity.monitoring_follower_wal_status,monitoring_vacuum.
Caveats
- Some views/functions depend on additional PostgreSQL supplied modules; upstream lists
pg_stat_statementsandpgstattuple. - This distribution is pure SQL and needs no preloaded shared library. After installing matching files, use
ALTER EXTENSION pgsql_tweaks UPDATE TO '1.1.0'for an existing installation. Helpers still require the relevant object or statistics privileges.