Skip to content

Commit 7dd62cd

Browse files
committed
pg_dump
1 parent 5c30d39 commit 7dd62cd

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

docs/features/sharding/resharding/schema.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ icon: material/database-edit-outline
33
---
44
# Schema sync
55

6-
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:
77

88
1. [Create tables](#tables-and-primary-keys), primary key indices, and sequences
99
2. Create [secondary indices](#secondary-indices)
@@ -34,7 +34,7 @@ Required (*) and optional parameters for this command are as follows:
3434

3535
## Tables and primary keys
3636

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.
3838

3939
### Primary keys
4040

@@ -72,6 +72,17 @@ schema_admin = true
7272

7373
PgDog will use that user to connect to the source and destination databases, so make sure to specify one for both of them.
7474

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+
7586
## Secondary indices
7687

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

Comments
 (0)