User Tools

Site Tools


postgresqlextensions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
postgresqlextensions [2024/03/01 15:25] z0hpvkpostgresqlextensions [2025/03/08 22:24] (current) – external edit 127.0.0.1
Line 59: Line 59:
 RELOAD; RELOAD;
 </code> </code>
-==== PG_STAT_STATEMENTS ====+==== pg_stat_statements ====
 [[https://www.postgresql.org/docs/current/pgstatstatements.html]] [[https://www.postgresql.org/docs/current/pgstatstatements.html]]
  
Line 155: Line 155:
 <code postgresql> <code postgresql>
 CREATE EXTENSION pg_repack; CREATE EXTENSION pg_repack;
 +</code>
 +
 +=== Usage ===
 +pg_repack will attempt to get an exclusive lock on the table being re-organised. \\
 +If it can’t then, by default, it will attempt to terminate any sessions that are blocking it. \\
 +
 +Use option ''--no-kill-backend (-D)'' to allow pg_repack to terminate if it can’t get a lock. \\
 +
 +<code bash>
 +cd pg_repack-1.4.5/bin
 +./pg_repack -k -h localhost -U postgres -D -t football.teams doob
 </code> </code>
postgresqlextensions.1709306708.txt.gz · Last modified: 2025/03/08 22:23 (external edit)