pg_cooldown

pg_cooldown

pg_cooldown : remove buffered pages for specific relations

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
5070
pg_cooldown
pg_cooldown
0.1
ADMIN
Apache-2.0
C
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-r
No
Yes
No
Yes
yes
no
Relationships
See Also
pgfincore
pgcozy
pg_prewarm
pg_buffercache
pg_repack
pg_squeeze
system_stats
pgmeminfo

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXT
PIGSTY
0.1
18
17
16
15
14
pg_cooldown-
RPM
PIGSTY
0.1
18
17
16
15
14
pg_cooldown_$v-
DEB
PIGSTY
0.1
18
17
16
15
14
postgresql-$v-pg-cooldown-
Linux / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el8.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el9.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el9.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el10.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
el10.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
d12.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
d12.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
d13.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
d13.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
u22.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
u22.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
u24.x86_64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
u24.aarch64
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1
PIGSTY 0.1

Source

pig build pkg pg_cooldown;		# 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_cooldown;		# install via package name, for the active PG version

pig install pg_cooldown -v 18;   # install for PG 18
pig install pg_cooldown -v 17;   # install for PG 17
pig install pg_cooldown -v 16;   # install for PG 16
pig install pg_cooldown -v 15;   # install for PG 15
pig install pg_cooldown -v 14;   # install for PG 14

Create this extension with:

CREATE EXTENSION pg_cooldown;

Usage

pg_cooldown: remove buffered pages for specific relations

pg_cooldown is the complement to pg_prewarm: it removes all buffered pages of a specific relation from the shared buffer, useful for simulating cold-start scenarios in research and testing.

Remove Pages from Shared Buffer

-- Remove all data pages of a table
SELECT pg_cooldown('my_relation');

-- Remove pages of a primary key index
SELECT pg_cooldown('my_relation_pkey');

-- Remove pages of any index
SELECT pg_cooldown('my_index_name');
Last updated on