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
Copy file name to clipboardExpand all lines: ydb/docs/en/core/postgresql/import.md
+27-20Lines changed: 27 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Dump data form PostgreSQL
2
2
3
+
{% include [./_includes/alert.md](./_includes/alert_preview.md) %}
4
+
3
5
Data from PostgreSQL can be migrated to {{ ydb-short-name }} using utilities such as [pg_dump](https://www.postgresql.org/docs/current/app-pgdump.html), [psql](https://www.postgresql.org/docs/current/app-psql.html), and [{{ ydb-short-name }} CLI](../reference/ydb-cli/index.md). The [pg_dump](https://www.postgresql.org/docs/current/app-pgdump.html) and [psql](https://www.postgresql.org/docs/current/app-psql.html) utilities are installed with PostgreSQL. [{{ ydb-short-name }} CLI](../reference/ydb-cli/index.md) is {{ ydb-short-name }}'s command-line client, which is [installed separately](../reference/ydb-cli/install.md).
4
6
5
7
To do this, you need to:
@@ -26,8 +28,8 @@ The `ydb tools pg-convert` command reads a dump file or standard input created b
26
28
* Deleting the `WITH (...)` section in `CREATE TABLE`.
27
29
* Commenting out unsupported constructs (optionally):
28
30
29
-
*`SELECT pg_catalog.set_config.*`
30
-
*`ALTER TABLE`
31
+
*`SELECT pg_catalog.set_config.*`
32
+
*`ALTER TABLE`
31
33
32
34
If the CLI cannot find a table's primary key, it will automatically create a [BIGSERIAL](https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-SERIAL) column named `__ydb_stub_id` as the primary key.
33
35
@@ -60,26 +62,31 @@ As an example, data generated by [pgbench](https://www.postgresql.org/docs/curre
60
62
61
63
1. Start Docker containers with PostgreSQL and {{ ydb-short-name }}:
62
64
63
-
```bash
64
-
docker run -d --rm -e POSTGRES_USER=root -e POSTGRES_PASSWORD=1234 \
0 commit comments