Skip to main content

Required settings

  • Database cluster with changefeed enabled
  • Service account

Setup script

Creating a service account

Granting read-only access

Use the following script to grant read-only access to the service account. Make sure to replace public and your_schema with the appropriate schema name.

Configuring garbage collection

By default, gc.ttlseconds is configured to 4 hours. You can check this value and also configure this by running the following commands. We recommend at least 12 hours. A changefeed can only resume within this window after a pause or outage, so match it to how long you might pause the pipeline. A shorter window keeps less MVCC history on disk.

Enabling changefeed

If you are on CockroachDB Basic or Standard, kv.rangefeed.enabled is enabled by default.
Run the following commands to enable changefeed: