Configuring Spock

Configuring Spock

You can use the following configuration parameters (or GUCs) on the command line with a SET statement or in a PostgreSQL configuration file.

spock.temp_directory

spock.temp_directory defines the system path where temporary files needed for schema synchronization are written. This path needs to exist and be writable by the user running PostgreSQL. The default is empty, which tells Spock to use the default temporary directory based on environment or operating system settings.

spock.extra_connection_options

You can use the spock.extra_connection_options parameter in the postgresql.conf file to assign connection options that apply to all connections made by Spock. This can be a useful place to set up custom keepalive options, etc.

spock defaults to enabling TCP keepalives to ensure that it notices when the upstream server disappears unexpectedly. To disable them add keepalives = 0 to spock.extra_connection_options.

spock.replicate_ddl

The spock.replicate_ddl function instructs Spock to checks the statement type of each transaction, and execute and replicate DDL statements.

spock.deny_all_ddl

spock.deny_all_ddl is a boolean value (the default is false) that enables or disables the execution of DDL statements within a Spock configured cluster. This option can be set at postmaster startup, with the SIGHUP mechanism, or on the command line with SQL if you're a superuser.

spock.conflict_prune_interval

spock.conflict_prune_interval specifies the time interval after which the conflict_tracker table will be pruned. This option can only be set at postmaster startup or by changing the configuration file and sending the HUP signal to the postmaster or a backend process. The parameter accepts values from 0 - 3600 seconds (the default is 30 seconds).

spock.channel_counters

spock.channel_counters is a boolean value (the default is true) that enables or disables the Spock channel statistic information collection. This option can only be set when the postmaster starts.

spock.stats_max_entries

spock.stats_max_entries specifies the maximum number of entries that can be stored into the Spock channel statistic. This option can only be set when the postmaster starts. The parameter accepts values from -1 to INT_MAX (the default is -1).

spock.save_resolutions is a boolean value (the default is false) that logs all conflict resolutions to the spock.resolutions table. This option can only be set when the postmaster starts.