You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PgDog can copy tables, indexes and other entities from your production database to the new, sharded database automatically. This is faster than using `pg_dump`, because we separate this process into two parts:
6
+
PgDog can copy tables, indices and other entities from your production database to the new, sharded database automatically. This is faster than using `pg_dump`, because we separate this process into two parts:
7
7
8
8
1.[Create tables](#tables-and-primary-keys), primary key indices, and sequences
9
9
2. Create [secondary indices](#secondary-indices)
@@ -34,7 +34,7 @@ Required (*) and optional parameters for this command are as follows:
34
34
35
35
## Tables and primary keys
36
36
37
-
The first step in the schema sync copies over tables and their primary key indexes from the source database to the new, resharded cluster. This has to be done separately, because Postgres's logical replication only copies data and doesn't manage table schemas.
37
+
The first step in the schema sync copies over tables and their primary key indices from the source database to the new, resharded cluster. This has to be done separately, because Postgres's logical replication only copies data and doesn't manage table schemas.
38
38
39
39
### Primary keys
40
40
@@ -72,6 +72,17 @@ schema_admin = true
72
72
73
73
PgDog will use that user to connect to the source and destination databases, so make sure to specify one for both of them.
74
74
75
+
### `pg_dump` version
76
+
77
+
PgDog is using `pg_dump` under the hood to export schema definitions. Postgres requires the version of `pg_dump` and the server to be identical. Our [Docker image](../../../installation.md) comes with `pg_dump` for PostgreSQL 16, but your database server may run a different version.
78
+
79
+
Before proceeding, make sure to install the correct version of `pg_dump` for your source database. If you have multiple versions of `pg_dump` installed on the same host, you can specify the path to the right one in `pgdog.toml`:
80
+
81
+
```toml
82
+
[replication]
83
+
pg_dump_path = "/path/to/pg_dump"
84
+
```
85
+
75
86
## Secondary indices
76
87
77
-
This step is performed after [data sync](hash.md) is complete. Running this step will create secondary indexes on all your tables, which will take some time.
88
+
This step is performed after [data sync](hash.md) is complete. Running this step will create secondary indices on all your tables, which will take some time.
0 commit comments