Skip to content

Setting Parameter Values

pgEdge Distributed Postgres (VM Edition) uses parameter settings in the postgresql.conf file to manage the replication behavior of Postgres and the extensions that provide advanced functionality for distributed multi-master clusters.

Parameters are set to their default values when you install Postgres. You can modify the parameter values later, but should consider the default values to be the minimum values required; we do not recommend lowering these values:

Parameter Name Valid/Default Settings and Description
hot_standby_feedback on; this setting is required.
max_worker_processes 12; this is the minimum value required.
max_replication_slots 16; this is the minimum value required.
max_wal_senders 16; this is the minimum value required.
shared_preload_libraries pg_stat_statements, snowflake, spock; include these values to use pgEdge replication features.
snowflake.node The snowflake node number; this value is unique to each node.
spock.allow_ddl_from_functions off; Use this GUC to specify automatic ddl replication behavior.
spock.conflict_resolution conflict_resolution sets the resolution method for any detected conflicts between local data and incoming changes. last_update_wins (the newest commit timestamp will be retained) is the default value used by pgEdge. To use conflict resolution, enable track_commit_timestamp as well.
spock.conflict_log_level The log level to use for logging conflicts; the default is: DEBUG.
spock.enable_ddl_replication off; Use this GUC to control automatic ddl replication behavior.
spock.exception_behaviour discard, transdiscard, or sub-disable; the default is transdiscard (if an error occurs, all operations are rolled back, regardless of succeeding or failing). Sub-disable disables the subscription for the node on which the exception was reported, and adds transactions for the disabled node to a queue that is written to the WAL log file; when the subscription is enabled, replication resumes with the transaction that caused the exception, followed by the other queued transactions.
spock.exception_logging none,discard, or all Use spock.exception_logging to specify a preference about logging exceptions when they occur.
spock.include_ddl_repset off; automatically add tables to replication sets at the time they are created on each node.
spock.readonly all, user, or off. The default of off means that the database is fully read/write. user means database can be updated by replication, but not by a client application. all means database is 100% read only and not even spock can modify it. Read only workloads are always allowed.
spock.save_resolutions off; log all conflict resolutions to the spock.resolutions table. This option can only be set when the postmaster starts.
track_commit_timestamp on; this setting is required.
wal_level logical; this setting is required.
wal_sender_timeout 5s; this is the minimum value required.

Note: On a Multi-master replication system, these parameter settings should be identical on each node. Additionally, the roles created on each node should be the same.