cybertec-postgresql / pg_squeeze

A PostgreSQL extension for automatic bloat cleanup
Other
470 stars 31 forks source link

[Feature] Add possibility to manually launch one time squeezes #30

Closed kmoppel closed 4 years ago

kmoppel commented 4 years ago

So maybe to have some nice function like squeeze.process_single_table($table_name, $timeout) that unconditionally (no bloat check) queues a rebuild.

ahouska commented 4 years ago

Doesn't the squeeze_table() function meet your requirements? It can be called directly w/o scheduling.

kmoppel commented 4 years ago

Ah thanks, my bad. Didn't look deeply enough...but would make sense to add some note on that to the README also.

kmoppel commented 4 years ago

Manual "squeeze" function signature: FUNCTION squeeze.squeeze_table(tabchema name, tabname name, clustering_index name, rel_tablespace name, ind_tablespaces name[])

Sample execution: SELECT squeeze.squeeze_table('public', 'pgbench_accounts', null, null, null);