Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the behaviour of import/export database with indexes #340

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/content/docs/migrate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ For more compact storage, you can export the data files in Parquet format as fol
EXPORT DATABASE '/path/to/export' (format="parquet");
```

:::note[Note]
The EXPORT DATABASE command also exports all indexes, regardless of whether their dependent extensions have been loaded or not.
:::

## Import database

The `IMPORT DATABASE` command imports the contents of the database from a specific directory to which
Expand All @@ -48,8 +52,9 @@ IMPORT DATABASE '/path/to/export';
```

:::note[Note]
The `IMPORT DATABASE` command can only be executed on an empty database.
1. The `IMPORT DATABASE` command can only be executed on an empty database.
Currently, in case of a failure during the execution of the `IMPORT DATABASE` command,
automatic rollback is not supported. Therefore, if the `IMPORT DATABASE` command fails, you will need to delete the
database directory you are connected to and reload it again.
2. The `IMPORT DATABASE` command also imports all indexes, regardless of whether their dependent extensions were loaded during export. If an index's dependent extension was loaded at the time of export, it will be automatically loaded during import. However, if the dependent extension was not loaded during export, it will not be automatically loaded during import. In such cases, users must manually load the dependent extensions before querying the index.
:::
Loading