Skip to main content
This page lists the commands and the flags that you can use to configure a MOLT Replicator command execution.

Commands

MOLT Replicator provides the following commands:
CommandDescription
pglogicalReplicate from PostgreSQL source to CockroachDB target using logical replication.
mylogicalReplicate from MySQL source to CockroachDB target using GTID-based replication.
oraclelogminerReplicate from Oracle source to CockroachDB target using Oracle LogMiner.
startReplicate from CockroachDB source to PostgreSQL, MySQL, or Oracle target (). Requires a CockroachDB changefeed with rangefeeds enabled.
make-jwtGenerate JWT tokens for authorizing changefeed connections in failback scenarios. Supports signing tokens with RSA or EC keys, or generating claims for external JWT providers. For details, refer to .
versionDisplay version information and Go module dependencies with checksums. For details, refer to .
For command-specific flags and examples, refer to MOLT Replicator’s and documentation.

Flags

This page lists all available flags for the MOLT Replicator commands: start, pglogical, mylogical, oraclelogminer, and make-jwt.
FlagCommandsTypeDescription
-a, --allowmake-jwtSTRINGOne or more database.schema identifiers. Can be repeated for multiple schemas.
--allowUnsupportedOracleVersionoraclelogminerBOOLUse at your own risk. Starts replication to CockroachDB from an Oracle major version outside of the instead of failing at startup. Unsupported versions are not supported by Cockroach Labs and may cause silent data corruption or permanent data loss in the worst case. Only use this flag if you fully accept the risk and can validate data integrity yourself.

Default: false
--applyTimeoutstart, pglogical, mylogical, oraclelogminerDURATIONThe maximum amount of time to wait for an update to be applied.

Default: 30s
--assumeIdempotentstartBOOLDisable the extra staging table queries that debounce non-idempotent redelivery in changefeeds.
--backfillFromSCNoraclelogminerINTThe SCN of the earliest active transaction at the time of the initial snapshot. Ensures no transactions are skipped when starting replication from Oracle.
--bestEffortOnlystartBOOLEventually-consistent mode; useful for high-throughput, skew-tolerant schemas with .
--bestEffortWindowstartDURATIONUse an eventually-consistent mode for initial backfill or when replication is behind; 0 to disable.

Default: 1h0m0s
--bindAddrstartSTRINGThe network address to bind to.

Default: ":26258"
--claimmake-jwtBOOLIf true, print a minimal JWT claim instead of signing.
--collapseMutationsstart, pglogical, mylogicalBOOLCombine multiple mutations on the same primary key within each batch into a single mutation.

Default: true
--defaultGTIDSetmylogicalSTRINGRequired the first time replicator is run. The default GTID set, in the format source_uuid:min(interval_start)-max(interval_end), which provides a replication marker for streaming changes.
--dataDirstart, pglogical, mylogical, oraclelogminerSTRINGBase directory for replicator data (for example, metrics snapshots).

Default: "replicator-data"
--disableAuthenticationstartBOOLDisable authentication of incoming Replicator requests; not recommended for production.
--disableFKAwareSchedulingstart, pglogical, mylogical, oraclelogminerBOOLDisable Replicator’s default foreign-key-aware scheduling, which serializes target transactions that touch foreign-key-related rows so that a parent and its child rows commit in order, preventing potential transient foreign-key violation errors.

Default: false
--discardstartBOOLDangerous: Discard all incoming HTTP requests; useful for changefeed throughput testing. Not intended for production.
--discardDelaystartDURATIONAdds additional delay in discard mode; useful for gauging the impact of changefeed round-trip time (RTT).
--dlqTableNamestart, pglogical, mylogical, oraclelogminerIDENTThe name of a table in the target schema for storing dead-letter entries.

Default: replicator_dlq
--enableCheckpointStreamstartBOOLEnable checkpoint streaming (use an internal changefeed from the staging table for real-time updates), rather than checkpoint polling (query the staging table for periodic updates), for failback replication.

Default: false (use checkpoint polling)
--enableParallelAppliesstart, pglogical, mylogical, oraclelogminerBOOLEnable parallel application of independent table groups during replication. By default, applies are synchronous. When enabled, this increases throughput at the cost of higher target pool usage and memory usage.

Default: false
--fetchMetadatamylogicalBOOLFetch column metadata explicitly, for older versions of MySQL that do not support binlog_row_metadata.
--flushPeriodstart, pglogical, mylogical, oraclelogminerDURATIONFlush queued mutations after this duration.

Default: 1s
--flushSizestart, pglogical, mylogical, oraclelogminerINTIdeal batch size to determine when to flush mutations.

Default: 1000
--gracePeriodstart, pglogical, mylogical, oraclelogminerDURATIONAllow background processes to exit.

Default: 30s
--healthCheckTimeoutstartDURATIONThe timeout for the health check endpoint.

Default: 5s
--httpResponseTimeoutstartDURATIONThe maximum amount of time to allow an HTTP handler to execute.

Default: 2m0s
--ignoreDeletionsForTablepglogicalSTRINGDrop DELETE mutations for the named tables before buffering, to avoid memory pressure from large batch deletions already handled by target-side TTLs.
--immediatestartBOOLBypass staging tables and write directly to target; recommended only for KV-style workloads with no .
-k, --keymake-jwtSTRINGThe path to a PEM-encoded private key to sign the token with.
--limitLookaheadstartINTLimit number of checkpoints to be considered when computing the resolving range; may cause replication to stall completely if older mutations cannot be applied.
--logDestinationstart, pglogical, mylogical, oraclelogminerSTRINGWrite logs to a file. If not specified, write logs to stdout.
--logFormatstart, pglogical, mylogical, oraclelogminerSTRINGChoose log output format: "fluent", "text".

Default: "text"
--maxRetriesstart, pglogical, mylogical, oraclelogminerINTMaximum number of times to retry a failed mutation on the target (for example, due to contention or a temporary unique constraint violation) before treating it as a hard failure.

Default: 10
--metricsAddrstart, pglogical, mylogical, oraclelogminerSTRINGA :port or host:port on which to serve metrics and diagnostics. The metrics endpoint is http://{host}:{port}/_/varz.
--metricsSnapshotCompressionstart, pglogical, mylogical, oraclelogminerSTRINGCompression for snapshot files: "gzip" or "none".

Default: "gzip"
--metricsSnapshotPeriodstart, pglogical, mylogical, oraclelogminerDURATIONHow often to periodically store a metrics snaphot to files (for example, 15s, 1m). Set to 0 to disable.

Default: 0
--metricsSnapshotRetentionSizestart, pglogical, mylogical, oraclelogminerSTRINGDelete oldest snapshots when the total size of the metrics-snapshots directory in the --dataDir exceeds this (for example, 100MB, 1GiB). Either this flag or --metricsSnapshotRetentionTime (or both) must be enabled.

Default: ""
--metricsSnapshotRetentionTimestart, pglogical, mylogical, oraclelogminerDURATIONDelete snapshots older than this duration (for example, 24h, 168h). 0 to disable. Either this flag or --metricsSnapshotRetentionSize (or both) must be enabled.

Default: 168h
--ndjsonBufferSizestartINTThe maximum amount of data to buffer while reading a single line of ndjson input; increase when source cluster has large blob values.

Default: 65536
--oracle-application-usersoraclelogminerSTRINGList of Oracle usernames responsible for DML transactions in the PDB schema. Enables replication from the latest-possible starting point. Usernames are case-sensitive and must match the internal Oracle usernames (e.g., PDB_USER).
-o, --outmake-jwtSTRINGA file to write the token to.
--parallelismstart, pglogical, mylogical, oraclelogminerINTThe number of concurrent database transactions to use.

Default: 16
--publicationNamepglogicalSTRINGThe publication within the source database to replicate.
--quiescentPeriodstart, pglogical, mylogical, oraclelogminerDURATIONHow often to retry deferred mutations.

Default: 10s
--replicationProcessIDmylogicalUINT32The replication process ID to report to the source database.

Default: 10
--retireOffsetstart, pglogical, mylogical, oraclelogminerDURATIONHow long to delay removal of applied mutations.

Default: 24h0m0s
--retryInitialBackoffstart, pglogical, mylogical, oraclelogminerDURATIONInitial delay before the first retry attempt when applying a mutation to the target database fails due to a retryable error, such as contention or a temporary unique constraint violation.

Default: 25ms
--retryMaxBackoffstart, pglogical, mylogical, oraclelogminerDURATIONMaximum delay between retry attempts when applying mutations to the target database fails due to retryable errors.

Default: 2s
--retryMultiplierstart, pglogical, mylogical, oraclelogminerINTMultiplier that controls how quickly the backoff interval increases between successive retries of failed applies to the target database.

Default: 2
--scanSizestart, pglogical, mylogical, oraclelogminerINTThe number of rows to retrieve from the staging database used to store metadata for replication.

Default: 10000
--schemaRefreshstart, pglogical, mylogical, oraclelogminerDURATIONHow often a watcher will refresh its schema. If this value is zero or negative, refresh behavior will be disabled.

Default: 1m0s
--scnoraclelogminerINTRequired the first time replicator is run. The snapshot System Change Number (SCN) from the initial data load, which provides a replication marker for streaming changes.
--scnWindowSizeoraclelogminerINTThe maximum size of SCN bounds per pull iteration from LogMiner. This helps prevent timeout errors when processing large SCN ranges. Set to 0 or a negative value to disable the cap.

Default: 3250
--slotNamepglogicalSTRINGRequired. PostgreSQL replication slot name. Must match the slot name specified with --pglogical-replication-slot-name in the .

Default: "replicator"
--sourceConnpglogical, mylogical, oraclelogminerSTRINGThe source database’s connection string. When replicating from Oracle, this is the connection string of the Oracle container database (CDB).
--sourcePDBConnoraclelogminerSTRINGConnection string for the Oracle pluggable database (PDB). Only required when using an Oracle multitenant configuration. --sourceConn must be included.
--sourceSchemaoraclelogminerSTRINGRequired. Source schema name on Oracle where tables will be replicated from.
--stageDisableCreateTableReaderIndexstart, pglogical, mylogical, oraclelogminerBOOLDisable the creation of partial covering indexes to improve read performance on staging tables. Set to true if creating indexes on existing tables would cause a significant operational impact.

Default: false
--stageMarkAppliedLimitstart, pglogical, mylogical, oraclelogminerINTLimit the number of mutations to be marked applied in a single statement.

Default: 100000
--stageSanityCheckPeriodstart, pglogical, mylogical, oraclelogminerDURATIONHow often to validate staging table apply order (-1 to disable).

Default: 10m0s
--stageSanityCheckWindowstart, pglogical, mylogical, oraclelogminerDURATIONHow far back to look when validating staging table apply order.

Default: 1h0m0s
--stageUnappliedPeriodstart, pglogical, mylogical, oraclelogminerDURATIONHow often to report the number of unapplied mutations in staging tables (-1 to disable).

Default: 1m0s
--stagingConnstart, pglogical, mylogical, oraclelogminerSTRINGThe staging database’s connection string.
--stagingCreateSchemastart, pglogical, mylogical, oraclelogminerBOOLAutomatically create the staging schema if it does not exist.
--stagingIdleTimestart, pglogical, mylogical, oraclelogminerDURATIONMaximum lifetime of an idle connection.

Default: 1m0s
--stagingJitterTimestart, pglogical, mylogical, oraclelogminerDURATIONThe time over which to jitter database pool disconnections.

Default: 15s
--stagingMaxLifetimestart, pglogical, mylogical, oraclelogminerDURATIONThe maximum lifetime of a database connection.

Default: 5m0s
--stagingMaxPoolSizestart, pglogical, mylogical, oraclelogminerINTThe maximum number of staging database connections.

Default: 128
--stagingSchemastart, pglogical, mylogical, oraclelogminerSTRINGName of the CockroachDB schema that stores replication metadata. Required each time replicator is rerun after being interrupted, as the schema contains a checkpoint table that enables replication to resume from the correct transaction.

Default: _replicator.public
--standbyTimeoutpglogicalDURATIONHow often to report WAL progress to the source server.

Default: 5s
--targetApplyQueueSizepglogical, oraclelogminerINTSize of the apply queue that buffers mutations before they are written to the target database. Larger values can improve throughput, but increase memory usage. This flag applies only to PostgreSQL and Oracle sources, and replaces the deprecated --copierChannel and --stageCopierChannelSize flags.
--targetConnstart, pglogical, mylogical, oraclelogminerSTRINGThe target database’s connection string.
--targetIdleTimestart, pglogical, mylogical, oraclelogminerDURATIONMaximum lifetime of an idle connection.

Default: 1m0s
--targetJitterTimestart, pglogical, mylogical, oraclelogminerDURATIONThe time over which to jitter database pool disconnections.

Default: 15s
--targetMaxLifetimestart, pglogical, mylogical, oraclelogminerDURATIONThe maximum lifetime of a database connection.

Default: 5m0s
--targetMaxPoolSizestart, pglogical, mylogical, oraclelogminerINTThe maximum number of target database connections.

Default: 128
--targetSchemapglogical, mylogical, oraclelogminerSTRINGRequired. The SQL database schema in the target cluster to update. CockroachDB schema names must be fully qualified in the format database.schema.
--targetStatementCacheSizestart, pglogical, mylogical, oraclelogminerINTThe maximum number of prepared statements to retain.

Default: 128
--taskGracePeriodstart, pglogical, mylogical, oraclelogminerDURATIONHow long to allow for task cleanup when recovering from errors.

Default: 1m0s
--timestampLimitstart, pglogical, mylogical, oraclelogminerINTThe maximum number of source timestamps to coalesce into a target transaction.

Default: 1000
--tlsCertificatestartSTRINGA path to a PEM-encoded TLS certificate chain.
--tlsPrivateKeystartSTRINGA path to a PEM-encoded TLS private key.
--tlsSelfSignedstartBOOLIf true, generate a self-signed TLS certificate valid for localhost.
--userscriptstart, pglogical, mylogical, oraclelogminerSTRINGThe path to a TypeScript configuration script. For example, --userscript 'script.ts'. For more information, refer to .
--userscriptQueueSizestart, pglogical, mylogical, oraclelogminerINTThe number of mutations that can be buffered in the queue between the userscript source acceptor and the core sequencer’s copier. Tune this value to avoid replication bottlenecks when using userscripts.

Default: 1000
-v, --verbosestart, pglogical, mylogical, oraclelogminerCOUNTIncrease logging verbosity. Use -v for debug logging or -vv for trace logging.