Skip to content

Commit 5ae7bf7

Browse files
committed
clarifications and corrections
1 parent 8c6d852 commit 5ae7bf7

9 files changed

+48
-25
lines changed

src/current/_includes/molt/fetch-data-load-output.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
1. Check the output to observe `fetch` progress.
22

33
{% if page.name == "migrate-load-replicate.md" %}
4+
<section class="filter-content" markdown="1" data-scope="postgres">
5+
If you included the `--pglogical-publication-and-slot-drop-and-recreate` flag, a publication named `molt_fetch` is automatically created:
6+
7+
~~~ json
8+
{"level":"info","time":"2025-02-10T14:28:11-05:00","message":"dropping and recreating publication molt_fetch"}
9+
~~~
10+
</section>
11+
412
<section class="filter-content" markdown="1" data-scope="oracle">
513
The following message shows the appropriate values for the `--backfillFromSCN` and `--scn` replication flags to use when [starting Replicator](#start-replicator):
614

src/current/_includes/molt/migration-prepare-database.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,20 @@ Connect to the primary instance (PostgreSQL primary, MySQL primary/master, or Or
165165
{{site.data.alerts.end}}
166166

167167
<section class="filter-content" markdown="1" data-scope="postgres">
168-
Verify that you are connected to the primary server by running `SELECT pg_is_in_recovery();` and getting a `false` result.
168+
Verify that you are connected to the primary server:
169+
170+
{% include_cached copy-clipboard.html %}
171+
~~~ sql
172+
SELECT pg_is_in_recovery();
173+
~~~
174+
175+
You should get a false result:
176+
177+
~~~
178+
pg_is_in_recovery
179+
-------------------
180+
f
181+
~~~
169182

170183
Enable logical replication by setting `wal_level` to `logical` in `postgresql.conf` or in the SQL shell. For example:
171184

src/current/_includes/molt/migration-prepare-schema.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
#### Schema Conversion Tool
44

5-
The [MOLT Schema Conversion Tool]({% link cockroachcloud/migrations-page.md %}) (SCT) automates target schema creation. It requires a free [CockroachDB {{ site.data.products.cloud }} account]({% link cockroachcloud/create-an-account.md %}).
5+
The [MOLT Schema Conversion Tool]({% link cockroachcloud/migrations-page.md %}) (SCT) converts source table definitions to CockroachDB-compatible syntax. It requires a free [CockroachDB {{ site.data.products.cloud }} account]({% link cockroachcloud/create-an-account.md %}).
66

7-
1. Upload a source `.sql` file to convert the syntax and identify [unimplemented features and syntax incompatibilities]({% link molt/migration-strategy.md %}#unimplemented-features-and-syntax-incompatibilities) in the schema.
7+
1. Upload a source `.sql` file to convert the syntax and identify [unimplemented features and syntax incompatibilities]({% link molt/migration-strategy.md %}#unimplemented-features-and-syntax-incompatibilities) in the table definitions.
88

9-
1. Import the converted schema to a CockroachDB cluster:
10-
- When migrating to CockroachDB {{ site.data.products.cloud }}, the Schema Conversion Tool automatically [applies the converted schema to a new {{ site.data.products.cloud }} database]({% link cockroachcloud/migrations-page.md %}#migrate-the-schema).
11-
- When migrating to a {{ site.data.products.core }} CockroachDB cluster, [export a converted schema file]({% link cockroachcloud/migrations-page.md %}#export-the-schema) and pipe the [data definition language (DDL)]({% link {{ site.current_cloud_version }}/sql-statements.md %}#data-definition-statements) directly into [`cockroach sql`]({% link {{ site.current_cloud_version }}/cockroach-sql.md %}).
9+
1. Import the converted table definitions to a CockroachDB cluster:
10+
- When migrating to CockroachDB {{ site.data.products.cloud }}, the Schema Conversion Tool automatically [applies the converted table definitions to a new {{ site.data.products.cloud }} database]({% link cockroachcloud/migrations-page.md %}#migrate-the-schema).
11+
- When migrating to a {{ site.data.products.core }} CockroachDB cluster, [export a converted DDL file]({% link cockroachcloud/migrations-page.md %}#export-the-schema) and pipe the [data definition language (DDL)]({% link {{ site.current_cloud_version }}/sql-statements.md %}#data-definition-statements) directly into [`cockroach sql`]({% link {{ site.current_cloud_version }}/cockroach-sql.md %}).
1212

1313
<section class="filter-content" markdown="1" data-scope="mysql">
1414
Syntax that cannot automatically be converted will be displayed in the [**Summary Report**]({% link cockroachcloud/migrations-page.md %}?filters=mysql#summary-report). These may include the following:
@@ -28,7 +28,7 @@ Identifiers are case-sensitive in MySQL and [case-insensitive in CockroachDB]({%
2828
The MySQL [`AUTO_INCREMENT`](https://dev.mysql.com/doc/refman/8.0/en/example-auto-increment.html) attribute, which creates sequential column values, is not supported in CockroachDB. When [using the Schema Conversion Tool]({% link cockroachcloud/migrations-page.md %}?filters=mysql#convert-a-schema), columns with `AUTO_INCREMENT` can be converted to use [sequences]({% link {{ site.current_cloud_version }}/create-sequence.md %}), `UUID` values with [`gen_random_uuid()`]({% link {{ site.current_cloud_version }}/functions-and-operators.md %}#id-generation-functions), or unique `INT8` values using [`unique_rowid()`]({% link {{ site.current_cloud_version }}/functions-and-operators.md %}#id-generation-functions). Cockroach Labs does not recommend using a sequence to define a primary key column. For more information, refer to [Unique ID best practices]({% link {{ site.current_cloud_version }}/performance-best-practices-overview.md %}#unique-id-best-practices).
2929

3030
{{site.data.alerts.callout_info}}
31-
Changing a column type during schema conversion will cause [MOLT Verify]({% link molt/molt-verify.md %}) to identify a type mismatch during data validation. This is expected behavior.
31+
Changing a column type during table definition conversion will cause [MOLT Verify]({% link molt/molt-verify.md %}) to identify a type mismatch during data validation. This is expected behavior.
3232
{{site.data.alerts.end}}
3333

3434
##### `ENUM` type

src/current/_includes/molt/molt-connection-strings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The source connection **must** point to the primary instance (PostgreSQL primary
1818
For example:
1919

2020
~~~
21-
--source 'postgres://migration_user:password@localhost:5432/molt?sslmode=verify-full'
21+
--source 'postgres://migration_user:password@localhost:5432/source_database?sslmode=verify-full'
2222
~~~
2323
</section>
2424

@@ -30,7 +30,7 @@ For example:
3030
For example:
3131

3232
~~~
33-
--source 'mysql://migration_user:password@localhost/molt?sslcert=.%2fsource_certs%2fclient.root.crt&sslkey=.%2fsource_certs%2fclient.root.key&sslmode=verify-full&sslrootcert=.%2fsource_certs%2fca.crt'
33+
--source 'mysql://migration_user:password@localhost/source_database?sslcert=.%2fsource_certs%2fclient.root.crt&sslkey=.%2fsource_certs%2fclient.root.key&sslmode=verify-full&sslrootcert=.%2fsource_certs%2fca.crt'
3434
~~~
3535
</section>
3636

src/current/_includes/molt/molt-docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ When testing locally, specify the host as follows:
6767

6868
{% if page.name == "molt-replicator.md" %}
6969
~~~
70-
--sourceConn 'postgres://postgres:[email protected]:5432/molt?sslmode=disable'
70+
--sourceConn 'postgres://postgres:[email protected]:5432/source_database?sslmode=disable'
7171
--targetConn "postgres://[email protected]:26257/defaultdb?sslmode=disable"
7272
~~~
7373
{% else %}
7474
~~~
75-
--source 'postgres://postgres:[email protected]:5432/molt?sslmode=disable'
75+
--source 'postgres://postgres:[email protected]:5432/source_database?sslmode=disable'
7676
--target "postgres://[email protected]:26257/defaultdb?sslmode=disable"
7777
~~~
7878
{% endif %}
@@ -81,12 +81,12 @@ When testing locally, specify the host as follows:
8181
8282
{% if page.name == "molt-replicator.md" %}
8383
~~~
84-
--sourceConn 'postgres://postgres:[email protected]:5432/molt?sslmode=disable'
84+
--sourceConn 'postgres://postgres:[email protected]:5432/source_database?sslmode=disable'
8585
--targetConn "postgres://[email protected]:26257/defaultdb?sslmode=disable"
8686
~~~
8787
{% else %}
8888
~~~
89-
--source 'postgres://postgres:[email protected]:5432/molt?sslmode=disable'
89+
--source 'postgres://postgres:[email protected]:5432/source_database?sslmode=disable'
9090
--target "postgres://[email protected]:26257/defaultdb?sslmode=disable"
9191
~~~
9292
{% endif %}

src/current/_includes/molt/molt-secure-connection-strings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- Provide your connection strings as environment variables. For example:
66

77
~~~ shell
8-
export SOURCE="postgres://migration_user:a%2452%26@localhost:5432/molt?sslmode=verify-full"
8+
export SOURCE="postgres://migration_user:a%2452%26@localhost:5432/source_database?sslmode=verify-full"
99
export TARGET="postgres://root@localhost:26257/defaultdb?sslmode=verify-full"
1010
~~~
1111

@@ -31,7 +31,7 @@
3131

3232
{% include_cached copy-clipboard.html %}
3333
~~~
34-
postgresql://[email protected]:5432/appdb?sslmode=verify-full&sslrootcert=/etc/molt/certs/ca.pem&sslcert=/etc/molt/certs/client.crt&sslkey=/etc/molt/certs/client.key
34+
postgresql://[email protected]:5432/appdb?sslmode=verify-full&sslrootcert=/etc/source_database/certs/ca.pem&sslcert=/etc/source_database/certs/client.crt&sslkey=/etc/source_database/certs/client.key
3535
~~~
3636

3737
- URL-encode connection strings for the source database and [CockroachDB]({% link {{site.current_cloud_version}}/connect-to-the-database.md %}) so special characters in passwords are handled correctly.
@@ -46,7 +46,7 @@
4646
Use the encoded password in your connection string. For example:
4747

4848
~~~
49-
postgres://migration_user:a%2452%26@localhost:5432/molt
49+
postgres://migration_user:a%2452%26@localhost:5432/source_database
5050
~~~
5151

5252
- Remove `sslmode=disable` from production connection strings.

src/current/_includes/molt/replicator-flags-usage.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ Configure the following [MOLT Replicator]({% link molt/replicator-flags.md %}) f
22

33
{% if page.name == "migrate-load-replicate.md" %}
44
<section class="filter-content" markdown="1" data-scope="postgres">
5-
| Flag | Description |
6-
|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7-
| [`--slotName`]({% link molt/replicator-flags.md %}#slot-name) | **Required.** PostgreSQL replication slot name. Must match the slot name specified with `--pglogical-replication-slot-name` in the [MOLT Fetch command](#start-fetch). |
8-
| [`--targetSchema`]({% link molt/replicator-flags.md %}#target-schema) | **Required.** Target schema name on CockroachDB where tables will be replicated. Schema name must be fully qualified in the format `database.schema`. |
9-
| [`--stagingSchema`]({% link molt/replicator-flags.md %}#staging-schema) | **Required.** Staging schema name on CockroachDB for replication metadata and checkpoints. Schema name must be fully qualified in the format `database.schema`. |
10-
| [`--stagingCreateSchema`]({% link molt/replicator-flags.md %}#staging-create-schema) | Automatically create the staging schema if it does not exist. Include this flag when starting replication for the first time. |
11-
| [`--metricsAddr`]({% link molt/replicator-flags.md %}#metrics-addr) | Enable Prometheus metrics at a specified `{host}:{port}`. Metrics are served at `http://{host}:{port}/_/varz`. |
5+
| Flag | Description |
6+
|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7+
| [`--slotName`]({% link molt/replicator-flags.md %}#slot-name) | **Required.** PostgreSQL replication slot name. Must match the slot name specified with `--pglogical-replication-slot-name` in the [MOLT Fetch command](#start-fetch). |
8+
| [`--publicationName`]({% link molt/replicator-flags.md %}#publication-name) | **Required.** PostgreSQL publication name. Must match the publication name created either manually or automatically with `--pglogical-publication-and-slot-drop-and-recreate` in the [MOLT Fetch command](#start-fetch). |
9+
| [`--targetSchema`]({% link molt/replicator-flags.md %}#target-schema) | **Required.** Target schema name on CockroachDB where tables will be replicated. Schema name must be fully qualified in the format `database.schema`. |
10+
| [`--stagingSchema`]({% link molt/replicator-flags.md %}#staging-schema) | **Required.** Staging schema name on CockroachDB for replication metadata and checkpoints. Schema name must be fully qualified in the format `database.schema`. |
11+
| [`--stagingCreateSchema`]({% link molt/replicator-flags.md %}#staging-create-schema) | Automatically create the staging schema if it does not exist. Include this flag when starting replication for the first time. |
12+
| [`--metricsAddr`]({% link molt/replicator-flags.md %}#metrics-addr) | Enable Prometheus metrics at a specified `{host}:{port}`. Metrics are served at `http://{host}:{port}/_/varz`. |
1213
</section>
1314

1415
<section class="filter-content" markdown="1" data-scope="mysql">

src/current/_includes/molt/verify-output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
{"level":"info","time":"2025-02-10T15:35:04-05:00","message":"starting verify on public.employees, shard 1/1"}
4949
~~~
5050

51-
A `finished row verification` message containing a summary is written after each table is compared. For details on the summary fields, refer to the [MOLT Verify]({% link molt/molt-verify.md %}#usage) page.
51+
A `finished row verification` message is written after each table is compared. If `num_success` equals `num_truth_rows` and the error counters (`num_missing`, `num_mismatch`, `num_extraneous`, and `num_column_mismatch`) are all `0`, the table verified successfully. Any non-zero values in the error counters indicate data discrepancies that need investigation. For details on each field, refer to the [MOLT Verify]({% link molt/molt-verify.md %}#usage) page.
5252

5353
~~~ json
5454
{"level":"info","type":"summary","table_schema":"public","table_name":"employees","num_truth_rows":200004,"num_success":200004,"num_conditional_success":0,"num_missing":0,"num_mismatch":0,"num_extraneous":0,"num_live_retry":0,"num_column_mismatch":0,"time":"2025-02-10T15:35:05-05:00","message":"finished row verification on public.employees (shard 1/1)"}

src/current/molt/migrate-load-replicate.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ MOLT Fetch captures a consistent point-in-time checkpoint at the start of the da
148148
{{site.data.alerts.end}}
149149

150150
<section class="filter-content" markdown="1" data-scope="postgres">
151-
1. Run the `replicator` command, using the same slot name that you specified with `--pglogical-replication-slot-name` in the [Fetch command](#start-fetch). Use `--stagingSchema` to specify a unique name for the staging database, and include `--stagingCreateSchema` to have MOLT Replicator automatically create the staging database:
151+
1. Run the `replicator` command, using the same slot name that you specified with `--pglogical-replication-slot-name` and the publication name created by `--pglogical-publication-and-slot-drop-and-recreate` in the [Fetch command](#start-fetch). Use `--stagingSchema` to specify a unique name for the staging database, and include `--stagingCreateSchema` to have MOLT Replicator automatically create the staging database:
152152

153153
{% include_cached copy-clipboard.html %}
154154
~~~ shell
@@ -157,6 +157,7 @@ MOLT Fetch captures a consistent point-in-time checkpoint at the start of the da
157157
--targetConn $TARGET \
158158
--targetSchema defaultdb.migration_schema \
159159
--slotName molt_slot \
160+
--publicationName molt_fetch \
160161
--stagingSchema defaultdb._replicator \
161162
--stagingCreateSchema \
162163
--metricsAddr :30005 \

0 commit comments

Comments
 (0)