Skip to content

Commit f935dc8

Browse files
authored
Update and edit migrate topics (yugabyte#5585)
1 parent 8f8fb9d commit f935dc8

File tree

10 files changed

+74
-70
lines changed

10 files changed

+74
-70
lines changed

docs/content/latest/_index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<div class="title">Migrate</div>
5656
</div>
5757
<div class="body">
58-
Migrate your application and your data from other databases to YugabyteDB.
58+
Migrate data and applications from other databases to YugabyteDB.
5959
</div>
6060
</a>
6161
</div>

docs/content/latest/migrate/_index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Migrate Applications to YugabyteDB
3-
headerTitle: Migrate Applications to YugabyteDB
2+
title: Migrate applications to YugabyteDB
3+
headerTitle: Migrate applications to YugabyteDB
44
linkTitle: Migrate
5-
description: Migrate existing applications to YugabyteDB.
5+
description: Migrate existing PostgreSQL and other RDBMS applications to YugabyteDB.
66
image: /images/section_icons/explore/high_performance.png
7-
headcontent: Migrate existing applications to YugabyteDB.
7+
headcontent: Migrate your PostgreSQL and other existing applications to YugabyteDB.
88
section: YUGABYTEDB CORE
99
menu:
1010
latest:
@@ -19,7 +19,7 @@ menu:
1919
<a class="section-link icon-offset" href="migration-process-overview/">
2020
<div class="head">
2121
<img class="icon" src="/images/section_icons/explore/high_performance.png" aria-hidden="true" />
22-
<div class="title">Migration Process</div>
22+
<div class="title">Migration process</div>
2323
</div>
2424
<div class="body">
2525
An overview of the migration process to YugabyteDB.
@@ -31,10 +31,10 @@ menu:
3131
<a class="section-link icon-offset" href="migrate-from-postgresql/">
3232
<div class="head">
3333
<img class="icon" src="/images/section_icons/explore/high_performance.png" aria-hidden="true" />
34-
<div class="title">Migrating from PostgreSQL</div>
34+
<div class="title">Migrate from PostgreSQL</div>
3535
</div>
3636
<div class="body">
37-
Migrating to YugabyteDB from PostgreSQL.
37+
Migrate your PostgreSQL data and applications to YugabyteDB.
3838
</div>
3939
</a>
4040
</div>

docs/content/latest/migrate/migrate-from-postgresql/_index.html renamed to docs/content/latest/migrate/migrate-from-postgresql/_index.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
title: Migrating From PostgreSQL
3-
linkTitle: Migrating From PostgreSQL
4-
description: Migrating from PostgreSQL to YugabyteDB
2+
title: Migrate PostgreSQL data and applications
3+
headerTitle: Migrate from PostgreSQL
4+
linkTitle: Migrate from PostgreSQL
5+
description: Steps for migrating PostgreSQL data and applications to YugabyteDB.
56
image: /images/section_icons/develop/learn.png
67
menu:
78
latest:
@@ -10,7 +11,7 @@
1011
weight: 730
1112
---
1213

13-
The steps below outline how to migrate from PostgreSQL to YugabyteDB manually. The sections below assume familiarity with the high level migration process to YugabyteDB.
14+
The steps below cover how to manually migrate PostgreSQL data and applications to YugabyteDB. The sections below assume that you have read [Migration process overview](../migration-process-overview).
1415

1516
{{< note title="Note" >}}
1617

@@ -27,7 +28,7 @@
2728
<div class="icon">
2829
<i class="icon-database-alt2"></i>
2930
</div>
30-
<div class="title">Schema Migration</div>
31+
<div class="title">Migrate a DDL schema</div>
3132
</div>
3233
<div class="body">
3334
Migrate your DDL schema from PostgreSQL to YugabyteDB.
@@ -41,10 +42,10 @@
4142
<div class="icon">
4243
<i class="icon-database-alt2"></i>
4344
</div>
44-
<div class="title">Application Migration</div>
45+
<div class="title">Migrate a PostgreSQL application</div>
4546
</div>
4647
<div class="body">
47-
Migrate an application written for PostgreSQL to YugabyteDB.
48+
Migrate a PostgreSQL application to YugabyteDB.
4849
</div>
4950
</a>
5051
</div>
@@ -55,10 +56,10 @@
5556
<div class="icon">
5657
<i class="icon-database-alt2"></i>
5758
</div>
58-
<div class="title">Export Data</div>
59+
<div class="title">Export PostgreSQL data</div>
5960
</div>
6061
<div class="body">
61-
Export data from PostgreSQL.
62+
Export data from PostgreSQL for importing into YugabyteDB.
6263
</div>
6364
</a>
6465
</div>
@@ -69,7 +70,7 @@
6970
<div class="icon">
7071
<i class="icon-database-alt2"></i>
7172
</div>
72-
<div class="title">Prepare Cluster</div>
73+
<div class="title">Prepare a cluster</div>
7374
</div>
7475
<div class="body">
7576
Prepare your YugabyteDB cluster for data import.
@@ -83,10 +84,10 @@
8384
<div class="icon">
8485
<i class="icon-database-alt2"></i>
8586
</div>
86-
<div class="title">Import Data</div>
87+
<div class="title">Import PostgreSQL data</div>
8788
</div>
8889
<div class="body">
89-
Import data into the YugabyteDB cluster.
90+
Import PostgreSQL data into a YugabyteDB cluster.
9091
</div>
9192
</a>
9293
</div>
@@ -97,10 +98,10 @@
9798
<div class="icon">
9899
<i class="icon-database-alt2"></i>
99100
</div>
100-
<div class="title">Verify Migration</div>
101+
<div class="title">Verify the migration</div>
101102
</div>
102103
<div class="body">
103-
Verify the result of the migration to YugabyteDB.
104+
Verify the migration to YugabyteDB was successful.
104105
</div>
105106
</a>
106107
</div>

docs/content/latest/migrate/migrate-from-postgresql/export-data.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Export Data
3-
headerTitle: Export Data
4-
linkTitle: Export Data
5-
description: How to export data from PostgreSQL.
2+
title: Export PostgreSQL data
3+
headerTitle: Export PostgreSQL data
4+
linkTitle: Export PostgreSQL data
5+
description: Steps for exporting PostgreSQL data for importing into YugabyteDB.
66
menu:
77
latest:
88
identifier: migrate-postgresql-export

docs/content/latest/migrate/migrate-from-postgresql/import-data.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
---
3-
title: Import Data
4-
headerTitle: Import Data
5-
linkTitle: Import Data
6-
description: How to import data into YugabyteDB.
3+
title: Import PostgreSQL data
4+
headerTitle: Import PostgreSQL data
5+
linkTitle: Import PostgreSQL data
6+
description: Steps for importing PostgreSQL data into YugabyteDB.
77
menu:
88
latest:
99
identifier: migrate-postgresql-import-data
@@ -13,7 +13,7 @@ isTocNested: false
1313
showAsideToc: true
1414
---
1515

16-
The next step is to import the data that was previously exported into YugabyteDB.
16+
The next step is to import the PostgreSQL data into YugabyteDB.
1717

1818
{{< note title="Note" >}}
1919
After the data import step, remember to recreate any constraints and triggers that might have been disabled to speed up loading the data. This would ensure that the database will perform relational integrity checking for data going forward.

docs/content/latest/migrate/migrate-from-postgresql/migrate-application.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: App Migration
3-
headerTitle: App Migration
4-
linkTitle: App Migration
2+
title: Migrate a PostgreSQL application
3+
headerTitle: Migrate a PostgreSQL application
4+
linkTitle: Migrate a PostgreSQL application
55
description: How to migrate an application written for PostgreSQL to YugabyteDB.
66
menu:
77
latest:
@@ -12,7 +12,7 @@ isTocNested: false
1212
showAsideToc: true
1313
---
1414

15-
This section outlines the recommended changes to port existing applications written against PostgreSQL.
15+
This section outlines the recommended changes for porting an existing PostgreSQL application to YugabyteDB.
1616

1717
## Retry transactions on conflicts
1818

docs/content/latest/migrate/migrate-from-postgresql/migrate-schema.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Schema Migration
3-
headerTitle: Schema Migration
4-
linkTitle: Schema Migration
5-
description: How to migrate PostgreSQL schema to YugabyteDB.
2+
title: Convert a PostgreSQL schema
3+
headerTitle: Convert a PostgreSQL schema
4+
linkTitle: Convert a PostgreSQL schema
5+
description: Steps for migrating a PostgreSQL schema for YugabyteDB.
66
menu:
77
latest:
88
identifier: migrate-postgresql-schema
@@ -20,13 +20,14 @@ Using `ysql_dump` tool can simplify some steps of your schema migration, [read m
2020

2121
{{< /tip >}}
2222

23-
2423
## Specify `PRIMARY KEY` inline
2524

2625
YugabyteDB (as of v2.2) does not support the PostgreSQL syntax of first declaring a table, and subsequently running an ALTER TABLE command to add the primary key. This is because the data in YugabyteDB tables are index-organized according to the primary key specification. There is a significant performance difference in a distributed SQL database between a table that is organized by row id with an added primary key constraint, versus a table whose data layout is index-organized from the get go.
2726

2827
{{< note title="Note" >}}
29-
Altering the primary key of a table after creation is a planned feature, the current status of this enhancement is tracked [here](https://github.com/yugabyte/yugabyte-db/issues/1104).
28+
29+
Altering the primary key of a table after creation is a planned feature, the current status of this enhancement is tracked in [GitHub issue #1104](https://github.com/yugabyte/yugabyte-db/issues/1104).
30+
3031
{{< /note >}}
3132

3233

@@ -44,42 +45,45 @@ To overcome the above issues, YugabyteDB supports `HASH` ordering in addition to
4445

4546
* Range queries **cannot** be efficiently supported on the index
4647

47-
48-
## Optimize DBs with many objects
48+
## Optimize databases with many objects
4949

5050
{{< tip title="Tip" >}}
51+
5152
Databases with over 500 objects (tables, indexes and unique constraints mainly) would benefit from the colocation optimization here. Colocation also improves join performance for smaller tables.
53+
5254
{{< /tip >}}
5355

5456
In many scenarios, there may be a large number of database objects (tables and indexes specifically) which hold a relatively small dataset. In such cases, creating a separate tablet for each table and index could drastically reduce performance. Colocating these tables and indexes into a single tablet can drastically improve performance.
5557

5658
Enabling the colocation property at a database level causes all tables created in this database to be colocated by default. Tables in this database that hold a large dataset or those that are expected to grow in size over time can be opted out of the colocation group, which would cause them to be split into multiple tablets.
5759

5860
{{< note title="Note" >}}
61+
5962
Making colocation the default for all databases is [work in progress](https://github.com/yugabyte/yugabyte-db/issues/5239).
60-
{{< /note >}}
6163

64+
{{< /note >}}
6265

6366
## Pre-split large tables
6467

65-
For larger tables/indexes that are hash sharded, specify the number of initial tablet splits desired as a part of the DDL statement of the table. This can be very beneficial to distribute the data of the table across multiple nodes right from the get go. An example of specifying the number of tablets at table creation time is shown [here](https://docs.yugabyte.com/latest/architecture/docdb-sharding/tablet-splitting/#hash-sharded-tables).
68+
For larger tables and indexes that are hash-sharded, specify the number of initial tablet splits desired as a part of the DDL statement of the table. This can be very beneficial to distribute the data of the table across multiple nodes right from the get go. An example of specifying the number of tablets at table creation time is shown [here](https://docs.yugabyte.com/latest/architecture/docdb-sharding/tablet-splitting/#hash-sharded-tables).
6669

67-
For larger tables/indexes that are range sharded and the value ranges of the primary key columns are known ahead of time, pre-split them at the time of creation. This is especially beneficial for range sharded tables/indexes. Pre-split an index using the syntax shown [here](https://docs.yugabyte.com/latest/architecture/docdb-sharding/tablet-splitting/#range-sharded-tables).
70+
For larger tables and indexes that are range-sharded and the value ranges of the primary key columns are known ahead of time, pre-split them at the time of creation. This is especially beneficial for range sharded tables/indexes. Pre-split an index using the syntax shown [here](https://docs.yugabyte.com/latest/architecture/docdb-sharding/tablet-splitting/#range-sharded-tables).
6871

69-
## Remove collation on columns
72+
## Remove collation on columns
7073

7174
YugabyteDB does not currently support any collation options using the COLLATE keyword (adding [collation support is in the roadmap](https://github.com/YugaByte/yugabyte-db/issues/1127)). Remove the COLLATE options in order move the schema over to YugabyteDB.
7275

7376
For example, consider the table definition below.
7477

75-
```
78+
```postgresql
7679
CREATE TABLE test1 (
7780
a text COLLATE "de_DE" PRIMARY KEY,
7881
b text COLLATE "es_ES"
7982
);
8083
```
8184

8285
Attempting to create this table would result in the following error.
86+
8387
```
8488
ERROR: 0A000: COLLATE not supported yet
8589
LINE 2: a text COLLATE "de_DE" PRIMARY KEY,
@@ -91,20 +95,20 @@ Time: 31.543 ms
9195

9296
The COLLATE options should be dropped as shown below.
9397

94-
```
98+
```postgresql
9599
CREATE TABLE test1 (
96100
a text PRIMARY KEY,
97101
b text
98102
);
99103
```
100104

101-
## Optimize sequences (`SERIAL`)
105+
## Optimize sequences (SERIAL)
102106

103107
All sequences in your schema currently use a default `CACHE` value of 1. In a distributed DB, this will result in each `INSERT` performing extra RPC calls to generate new row ids, dramatically reducing write performance.
104108

105109
Consider the following table as an example.
106110

107-
```
111+
```postgresql
108112
CREATE TABLE contacts (
109113
contact_id SERIAL,
110114
first_name VARCHAR NOT NULL,
@@ -118,7 +122,6 @@ CREATE TABLE contacts (
118122

119123
One of the following techniques is recommended (in the order of preference) to improve performance when using sequences.
120124

121-
122125
### Option 1. Larger `CACHE` value for `SERIAL`
123126

124127
In order to use the `SERIAL` data type and not incur a performance penalty on `INSERT` operations, setting the cache size to 1000 is recommended. This can be achieved in the example table above by running an `ALTER` command on the sequence in the following manner.
@@ -147,7 +150,7 @@ A UUID is a 128-bit quantity that is generated by an algorithm chosen to make it
147150

148151
The table shown in the example above should be changed as shown below.
149152

150-
```
153+
```postgresql
151154
CREATE EXTENSION IF NOT EXISTS pgcrypto;
152155
153156
CREATE TABLE contacts (
@@ -162,12 +165,12 @@ CREATE TABLE contacts (
162165

163166
## Using `ysql_dump`
164167

165-
The PostgreSQL utility, pg_dump can be used to dump the schema of a database. However, this schema would need to be slightly modified as described below.
168+
The PostgreSQL utility, pg_dump, can be used to dump the schema of a database. However, this schema would need to be slightly modified as described below.
166169

167-
The `ysql_dump` tool (which is a YugabyteDB specific version of the pg_dump tool) can connect to an existing PostgreSQL database and export a YugabyteDB-friendly version of the schema (and therefore includes some of the schema modifications described below). The other changes mentioned below would need to be manually performed since they depend on the use-case.
170+
The [`ysql_dump`](../../../admin/ysql-dump) tool (a YugabyteDB-specific version of the `pg_dump` tool) can connect to an existing PostgreSQL database and export a YugabyteDB-friendly version of the schema and, therefore, includes some of the schema modifications described below. The other changes mentioned below would need to be manually performed since they depend on the use case.
168171

169172
{{< note title="Note" >}}
170-
Note that `ysql_dump` has been tested upto PostgreSQL v11.2, it may not work on very new versions of PostgreSQL.
171-
{{< /note >}}
172173

174+
Note that `ysql_dump` has been tested with PostgreSQL versions up to v11.2 and might not work on newer versions of PostgreSQL.
173175

176+
{{< /note >}}

docs/content/latest/migrate/migrate-from-postgresql/prepare-cluster.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Prepare Cluster
3-
headerTitle: Prepare Cluster
4-
linkTitle: Prepare Cluster
5-
description: Prepare the cluster for importing data.
2+
title: Prepare a cluster
3+
headerTitle: Prepare a cluster
4+
linkTitle: Prepare a cluster
5+
description: Prepare a YugabyteDB cluster for importing PostgreSQL data.
66
menu:
77
latest:
88
identifier: migrate-postgresql-prepare-cluster

docs/content/latest/migrate/migrate-from-postgresql/verify-migration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Verify Migration
3-
headerTitle: Verify Migration
2+
title: Verify a migration from PostgreSQL
3+
headerTitle: Verify a migration
44
linkTitle: Verify Migration
5-
description: Verify migration to YugabyteDB.
5+
description: Steps for verifying that a migration from PostgreSQL to YugabyteDB was successful.
66
menu:
77
latest:
88
identifier: migrate-postgresql-verify

docs/content/latest/migrate/migration-process-overview.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: Migration Process
3-
headerTitle: Migration Process
4-
linkTitle: Migration Process
5-
description: Overview of the migration process.
2+
title: Migration process overview
3+
headerTitle: Migration process overview
4+
linkTitle: Migration process overview
5+
description: Overview of the process for migrating data and applications from other databases to YugabyteDB.
66
menu:
77
latest:
88
identifier: migration-overview
@@ -12,9 +12,9 @@ isTocNested: true
1212
showAsideToc: true
1313
---
1414

15-
This page describes the general migration process from various RDBMS to YugabyteDB (YSQL API).
15+
This page describes the general migration process from other RDBMS to YugabyteDB (YSQL API).
1616

17-
The process of migrating to YugabyteDB largely looks similar to the process of migrating an application to PostgreSQL. There are some minor differences between YugabyteDB and PostgreSQL, which are covered in detail in the section on [migrating from PostgreSQL to YugabyteDB](../migrate-from-postgresql). The high-level process of moving from any source database to YugabyteDB is outlined below.
17+
The process of migrating to YugabyteDB largely looks similar to the process of migrating an application to PostgreSQL. There are some minor differences between YugabyteDB and PostgreSQL, which are covered in detail in [Migrate from PostgreSQL to YugabyteDB](../migrate-from-postgresql). The high-level process of moving from any source database to YugabyteDB is outlined below.
1818

1919
### Step 1. Migrate DDL (schema)
2020

0 commit comments

Comments
 (0)