Skip to content

pg_upless

Detect Useless UPDATE

pg_upless · Detect Useless UPDATE

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
5180pg_uplesspg_upless0.0.3ADMINPostgreSQLSQL
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
----dt-NoNoNoYesnoyes

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY0.0.319 18 17 16 15pg_uplessplpgsql
RPMPIGSTY0.0.319 18 17 16 15pg_upless_$v-
DEBPIGSTY0.0.319 18 17 16 15postgresql-$v-pg-upless-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el8.aarch64N/APIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el9.x86_64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el9.aarch64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el10.x86_64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
el10.aarch64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
d12.x86_64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
d12.aarch64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
d13.x86_64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
d13.aarch64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
u22.x86_64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
u22.aarch64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
u24.x86_64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
u24.aarch64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
u26.x86_64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
u26.aarch64PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3PIGSTY 0.0.3
PackageVersionOSORGSIZEFile URL
pg_upless_190.0.3el9.x86_64pigsty11.5 KiBpg_upless_19-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_190.0.3el9.aarch64pigsty11.5 KiBpg_upless_19-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_190.0.3el10.x86_64pigsty11.6 KiBpg_upless_19-0.0.3-1PGSTY.el10.noarch.rpm
pg_upless_190.0.3el10.aarch64pigsty11.6 KiBpg_upless_19-0.0.3-1PGSTY.el10.noarch.rpm
postgresql-19-pg-upless0.0.3d12.x86_64pigsty5.2 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-19-pg-upless0.0.3d12.aarch64pigsty5.2 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-19-pg-upless0.0.3d13.x86_64pigsty5.2 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-19-pg-upless0.0.3d13.aarch64pigsty5.2 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-19-pg-upless0.0.3u22.x86_64pigsty4.9 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-19-pg-upless0.0.3u22.aarch64pigsty4.9 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-19-pg-upless0.0.3u24.x86_64pigsty4.9 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-19-pg-upless0.0.3u24.aarch64pigsty4.9 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-19-pg-upless0.0.3u26.x86_64pigsty4.9 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~resolute_all.deb
postgresql-19-pg-upless0.0.3u26.aarch64pigsty4.9 KiBpostgresql-19-pg-upless_0.0.3-1PGSTY~resolute_all.deb
PackageVersionOSORGSIZEFile URL
pg_upless_180.0.3el8.x86_64pigsty11.5 KiBpg_upless_18-0.0.3-1PGSTY.el8.noarch.rpm
pg_upless_180.0.3el8.aarch64pigsty11.5 KiBpg_upless_18-0.0.3-1PGSTY.el8.noarch.rpm
pg_upless_180.0.3el9.x86_64pigsty11.5 KiBpg_upless_18-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_180.0.3el9.aarch64pigsty11.5 KiBpg_upless_18-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_180.0.3el10.x86_64pigsty11.6 KiBpg_upless_18-0.0.3-1PGSTY.el10.noarch.rpm
pg_upless_180.0.3el10.aarch64pigsty11.6 KiBpg_upless_18-0.0.3-1PGSTY.el10.noarch.rpm
postgresql-18-pg-upless0.0.3d12.x86_64pigsty5.2 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-18-pg-upless0.0.3d12.aarch64pigsty5.2 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-18-pg-upless0.0.3d13.x86_64pigsty5.2 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-18-pg-upless0.0.3d13.aarch64pigsty5.2 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-18-pg-upless0.0.3u22.x86_64pigsty4.9 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-18-pg-upless0.0.3u22.aarch64pigsty4.9 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-18-pg-upless0.0.3u24.x86_64pigsty4.9 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-18-pg-upless0.0.3u24.aarch64pigsty4.9 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-18-pg-upless0.0.3u26.x86_64pigsty4.9 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~resolute_all.deb
postgresql-18-pg-upless0.0.3u26.aarch64pigsty4.9 KiBpostgresql-18-pg-upless_0.0.3-1PGSTY~resolute_all.deb
PackageVersionOSORGSIZEFile URL
pg_upless_170.0.3el8.x86_64pigsty11.5 KiBpg_upless_17-0.0.3-1PGSTY.el8.noarch.rpm
pg_upless_170.0.3el8.aarch64pigsty11.5 KiBpg_upless_17-0.0.3-1PGSTY.el8.noarch.rpm
pg_upless_170.0.3el9.x86_64pigsty11.5 KiBpg_upless_17-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_170.0.3el9.aarch64pigsty11.5 KiBpg_upless_17-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_170.0.3el10.x86_64pigsty11.6 KiBpg_upless_17-0.0.3-1PGSTY.el10.noarch.rpm
pg_upless_170.0.3el10.aarch64pigsty11.6 KiBpg_upless_17-0.0.3-1PGSTY.el10.noarch.rpm
postgresql-17-pg-upless0.0.3d12.x86_64pigsty5.2 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-17-pg-upless0.0.3d12.aarch64pigsty5.2 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-17-pg-upless0.0.3d13.x86_64pigsty5.2 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-17-pg-upless0.0.3d13.aarch64pigsty5.2 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-17-pg-upless0.0.3u22.x86_64pigsty4.9 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-17-pg-upless0.0.3u22.aarch64pigsty4.9 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-17-pg-upless0.0.3u24.x86_64pigsty4.9 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-17-pg-upless0.0.3u24.aarch64pigsty4.9 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-17-pg-upless0.0.3u26.x86_64pigsty4.9 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~resolute_all.deb
postgresql-17-pg-upless0.0.3u26.aarch64pigsty4.9 KiBpostgresql-17-pg-upless_0.0.3-1PGSTY~resolute_all.deb
PackageVersionOSORGSIZEFile URL
pg_upless_160.0.3el8.x86_64pigsty11.5 KiBpg_upless_16-0.0.3-1PGSTY.el8.noarch.rpm
pg_upless_160.0.3el8.aarch64pigsty11.5 KiBpg_upless_16-0.0.3-1PGSTY.el8.noarch.rpm
pg_upless_160.0.3el9.x86_64pigsty11.5 KiBpg_upless_16-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_160.0.3el9.aarch64pigsty11.5 KiBpg_upless_16-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_160.0.3el10.x86_64pigsty11.6 KiBpg_upless_16-0.0.3-1PGSTY.el10.noarch.rpm
pg_upless_160.0.3el10.aarch64pigsty11.6 KiBpg_upless_16-0.0.3-1PGSTY.el10.noarch.rpm
postgresql-16-pg-upless0.0.3d12.x86_64pigsty5.2 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-16-pg-upless0.0.3d12.aarch64pigsty5.2 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-16-pg-upless0.0.3d13.x86_64pigsty5.2 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-16-pg-upless0.0.3d13.aarch64pigsty5.2 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-16-pg-upless0.0.3u22.x86_64pigsty4.9 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-16-pg-upless0.0.3u22.aarch64pigsty4.9 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-16-pg-upless0.0.3u24.x86_64pigsty4.9 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-16-pg-upless0.0.3u24.aarch64pigsty4.9 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-16-pg-upless0.0.3u26.x86_64pigsty4.9 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~resolute_all.deb
postgresql-16-pg-upless0.0.3u26.aarch64pigsty4.9 KiBpostgresql-16-pg-upless_0.0.3-1PGSTY~resolute_all.deb
PackageVersionOSORGSIZEFile URL
pg_upless_150.0.3el8.x86_64pigsty11.5 KiBpg_upless_15-0.0.3-1PGSTY.el8.noarch.rpm
pg_upless_150.0.3el8.aarch64pigsty11.5 KiBpg_upless_15-0.0.3-1PGSTY.el8.noarch.rpm
pg_upless_150.0.3el9.x86_64pigsty11.5 KiBpg_upless_15-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_150.0.3el9.aarch64pigsty11.5 KiBpg_upless_15-0.0.3-1PGSTY.el9.noarch.rpm
pg_upless_150.0.3el10.x86_64pigsty11.6 KiBpg_upless_15-0.0.3-1PGSTY.el10.noarch.rpm
pg_upless_150.0.3el10.aarch64pigsty11.6 KiBpg_upless_15-0.0.3-1PGSTY.el10.noarch.rpm
postgresql-15-pg-upless0.0.3d12.x86_64pigsty5.2 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-15-pg-upless0.0.3d12.aarch64pigsty5.2 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~bookworm_all.deb
postgresql-15-pg-upless0.0.3d13.x86_64pigsty5.2 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-15-pg-upless0.0.3d13.aarch64pigsty5.2 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~trixie_all.deb
postgresql-15-pg-upless0.0.3u22.x86_64pigsty4.9 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-15-pg-upless0.0.3u22.aarch64pigsty4.9 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~jammy_all.deb
postgresql-15-pg-upless0.0.3u24.x86_64pigsty4.9 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-15-pg-upless0.0.3u24.aarch64pigsty4.9 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~noble_all.deb
postgresql-15-pg-upless0.0.3u26.x86_64pigsty4.9 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~resolute_all.deb
postgresql-15-pg-upless0.0.3u26.aarch64pigsty4.9 KiBpostgresql-15-pg-upless_0.0.3-1PGSTY~resolute_all.deb

Source

pig build pkg pg_upless;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pg_upless;		# install by package name

pig install pg_upless -v 19;   # install for PG 19
pig install pg_upless -v 18;   # install for PG 18
pig install pg_upless -v 17;   # install for PG 17
pig install pg_upless -v 16;   # install for PG 16
pig install pg_upless -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION pg_upless CASCADE; -- requires plpgsql

Usage

pg_upless: Detect Useless UPDATE

pg_upless detects UPDATE statements that change no actual values (common with ORMs). It works by installing triggers on monitored tables and collecting statistics. It is intended as a diagnostic tool, not for permanent use.

Start Monitoring

-- Monitor a specific table
SELECT pg_upless_start('public', 'boats');

-- Monitor all tables in a schema
SELECT pg_upless_start('public');

Stop Monitoring

-- Stop monitoring a specific table
SELECT pg_upless_stop('public', 'boats');

-- Stop monitoring all tables in a schema
SELECT pg_upless_stop('public');

View Statistics

The extension creates two tables in the pg_upless schema:

  • pg_upless_stats – stores counts of total vs useless updates per table
  • pg_upless_start_time – records when monitoring started (for rate calculations)

Table reader