-
Notifications
You must be signed in to change notification settings - Fork 29
migration_PG 12 #239
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
migration_PG 12 #239
Changes from 13 commits
d849d26
ed601c3
4d636da
775e82e
36e3ff8
d3a88fb
8bc141b
bccfada
0a88b1f
ed82880
e6180e9
6d1d4ba
59de585
a1938ac
a88078f
864656c
9242bb4
228cffb
a1cd838
168ee5e
224092e
56c8c46
4ef2f5d
29c63f8
5a30969
9fde3d4
afe4cfa
592dfad
c203a31
6c4d9f3
f3f4059
7baf93d
3c5018f
033bae8
26696a2
686bdf2
ebcc5e1
4de4d81
dd452f6
62ab80d
478a40f
09209ee
9fadd5f
dd55770
e0afb78
47c7757
6ee0bb2
0173e17
a6dbb66
0369647
a4325e6
8bab491
23a4e66
4ce9eb2
bf2afd3
3020605
068b8ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,71 @@ | ||||||
| # Migrate from PostgreSQL 12 | ||||||
|
|
||||||
| !!! info "Important" | ||||||
| Percona Everest 1.6.0 has officially discontinued support for PostgreSQL 12. To ensure compatibility, security, and access to new features, it is highly recommended to migrate to PostgreSQL 13 or later. | ||||||
|
|
||||||
| ## Preparation before migration | ||||||
|
|
||||||
| Before migrating from PostgreSQL 12, it's important to prepare thoroughly to ensure a smooth transition. Here are the key steps: | ||||||
| {.power-number} | ||||||
|
|
||||||
| 1. **Backup your data** - Create a complete backup of your data before upgrading. | ||||||
|
|
||||||
| 2. **Check Compatibility** - Verify that your extensions and configurations are compatible with the new PostgreSQL version. | ||||||
|
rasika-chivate marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| 3. **Install the new version** – Download and install the target PostgreSQL release. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we be talking about creating the new DB on Everest rather than downloading and installing it elsewhere?
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||||||
|
|
||||||
|
|
||||||
| ## Choose a migration option | ||||||
|
|
||||||
| When upgrading from PostgreSQL 12, it is essential to choose a migration method that suits your environment. For a smooth transition, consider the following factors during migration: | ||||||
|
|
||||||
| - Data size | ||||||
|
|
||||||
| - Downtime tolerance | ||||||
|
|
||||||
| - Infrastructure (Kubernetes, cloud, on-premise) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Everest can run on Kubernetes only (unless you meant on-premise Kubernetes, in which case we should rephrase this)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed it. |
||||||
|
|
||||||
| PostgreSQL offers several migration options. Each method has its own benefits and trade-offs in terms of speed, complexity, and risk. | ||||||
|
|
||||||
| Review PostgreSQL documentation to select the best option for your environment. | ||||||
|
|
||||||
| 💡 Need assistance? Connect with the Percona Everest community or consult a Percona Expert. connect with [Percona Everest community](https://forums.percona.com/t/welcome-to-perconas-community-forum/7){:target="_blank"}! Alternatively, you can always [Talk to a Percona Expert](../get-help.md#percona-experts). | ||||||
|
|
||||||
| ### Logical Dump and Restore vs. Logical Replication | ||||||
|
|
||||||
| Two commonly used approaches to migrating a PostgreSQL database are Logical Dump and Restore and Logical Replication. Both methods help move data from one instance to another, but they have different purposes and distinct advantages. | ||||||
|
|
||||||
| | **Feature** | **Logical Dump and Restore** | **Logical Replication** | | ||||||
| |--------------------------|-------------------------------------------|--------------------------------------| | ||||||
| | **Setup complexity** | Simple and portable | More complex, involves replication slots | | ||||||
| | **Best suited for** | One-time migrations, backups, and moving datasets across versions | Continuous data synchronization | | ||||||
| | **Downtime Impact** | Requires application downtime during migration | Minimal downtime | | ||||||
| | **Primary Keys requirement** | No primary keys required; exports full table data regardless of constraints | Requires primary keys (or unique indexes) on tables| | ||||||
| | **Schema compatibility** | Allows schema modifications before restoration; supports cross-version migration | Requires schema compatibility between source and target databases | | ||||||
| | **Performance** | Can be slow for large datasets due to full export/import | More efficient for continuous updates, but may add replication overhead | | ||||||
|
|
||||||
| ### Logical Dump and Restore | ||||||
|
|
||||||
| This option is recommended for **smaller databases** and **one-time migrations**. | ||||||
| {.power-number} | ||||||
|
|
||||||
| 1. Use [pg_dump/pg_dumpall](https://www.postgresql.org/docs/current/app-pgdump.html) to **export** your data from PostgreSQL 12. | ||||||
|
|
||||||
| 2. Use [pg_restore](https://www.postgresql.org/docs/current/app-pgrestore.html) or [psql](https://www.postgresql.org/docs/current/app-psql.html) to import data into a new cluster. | ||||||
|
|
||||||
| For comprehensive information, dive deep into the [PostgreSQL documentation on pg_dump](https://www.postgresql.org/docs/current/backup-dump.html). | ||||||
|
|
||||||
| ### Logical Replication | ||||||
|
|
||||||
| This option is recommended for **minimal downtime**. | ||||||
|
|
||||||
| Use [logical replication](https://www.postgresql.org/docs/current/logical-replication.html) to continuously replicate data from your PostgreSQL 12 cluster into a PostgresQLG 13+ cluster with little to no downtime. | ||||||
|
|
||||||
| For comprehensive information, dive deep into the [PostgreSQL documentation on logical replication](https://www.postgresql.org/docs/current/logical-replication.html). | ||||||
|
recharte marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.