Dashboard Configuration

This extension requires activation via the PlanetScale Dashboard before it can be used. It must be enabled through shared libraries and requires a database restart. To enable pg_squeeze:
1

From the PlanetScale organization dashboard, select the desired database
2

Navigate to the Cluster configuration page from the menu on the left
3

Choose the branch whose extensions you’d like to configure in the “Branch” dropdown
4

Select the Extensions tab
5

Enable pg_squeeze and configure its parameters
6

Click Queue extension changes to apply the configuration
7

Once you’re ready to apply the changes, click “Apply changes

Parameters

squeeze.max_xlock_time

  • Type: Integer (milliseconds)
  • Default: 0
  • Minimum: 0
  • Description: The maximum time the processed table may be locked exclusively.

squeeze.worker_autostart

  • Type: String
  • Default: postgres
  • Description: Space-separated list of databases to start background workers for automatically.

squeeze.workers_per_database

  • Type: Integer
  • Default: 1
  • Minimum: 1
  • Description: Maximum number of worker processes launched per database. Must be less than or equal to cluster-level max_worker_processes.

Usage

After enabling the extension through the dashboard, you can install it in your database:
CREATE EXTENSION IF NOT EXISTS pg_squeeze;
Then you can schedule tables for squeezing:
-- Schedule a table to be squeezed
SELECT squeeze.squeeze_table('public', 'your_table_name');

External Documentation

For more detailed information about pg_squeeze usage and configuration, see the official pg_squeeze documentation.