-
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
Merged
Merged
migration_PG 12 #239
Changes from 49 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
d849d26
migration_PG 12
rasika-chivate ed601c3
Update mkdocs-base.yml
rasika-chivate 4d636da
Update postgresql12_migration.md
rasika-chivate 775e82e
Update postgresql12_migration.md
rasika-chivate 36e3ff8
Update postgresql12_migration.md
rasika-chivate d3a88fb
Update postgresql12_migration.md
rasika-chivate 8bc141b
Update postgresql12_migration.md
rasika-chivate bccfada
Update postgresql12_migration.md
rasika-chivate 0a88b1f
Update postgresql12_migration.md
rasika-chivate ed82880
Update postgresql12_migration.md
rasika-chivate e6180e9
Update postgresql12_migration.md
rasika-chivate 6d1d4ba
Update postgresql12_migration.md
rasika-chivate 59de585
Update postgresql12_migration.md
rasika-chivate a1938ac
Update known_limitations.md
rasika-chivate a88078f
Update docs/reference/postgresql12_migration.md
rasika-chivate 864656c
Update postgresql12_migration.md
rasika-chivate 9242bb4
Update postgresql12_migration.md
rasika-chivate 228cffb
Update postgresql12_migration.md
rasika-chivate a1cd838
Update postgresql12_migration.md
rasika-chivate 168ee5e
Update postgresql12_migration.md
rasika-chivate 224092e
Update postgresql12_migration.md
rasika-chivate 56c8c46
Update postgresql12_migration.md
rasika-chivate 4ef2f5d
Update postgresql12_migration.md
rasika-chivate 29c63f8
Update postgresql12_migration.md
rasika-chivate 5a30969
Update postgresql12_migration.md
rasika-chivate 9fde3d4
Update postgresql12_migration.md
rasika-chivate afe4cfa
Update postgresql12_migration.md
rasika-chivate 592dfad
Update postgresql12_migration.md
rasika-chivate c203a31
Update postgresql12_migration.md
rasika-chivate 6c4d9f3
Update postgresql12_migration.md
rasika-chivate f3f4059
Update postgresql12_migration.md
rasika-chivate 7baf93d
Update postgresql12_migration.md
rasika-chivate 3c5018f
Update postgresql12_migration.md
rasika-chivate 033bae8
Update docs/reference/postgresql12_migration.md
rasika-chivate 26696a2
Update postgresql12_migration.md
rasika-chivate 686bdf2
Update postgresql12_migration.md
rasika-chivate ebcc5e1
Update postgresql12_migration.md
rasika-chivate 4de4d81
Update postgresql12_migration.md
rasika-chivate dd452f6
Update postgresql12_migration.md
rasika-chivate 62ab80d
Update postgresql12_migration.md
rasika-chivate 478a40f
Update postgresql12_migration.md
rasika-chivate 09209ee
Update postgresql12_migration.md
rasika-chivate 9fadd5f
Update postgresql12_migration.md
rasika-chivate dd55770
Update postgresql12_migration.md
rasika-chivate e0afb78
Update postgresql12_migration.md
rasika-chivate 47c7757
Update postgresql12_migration.md
rasika-chivate 6ee0bb2
Update postgresql12_migration.md
rasika-chivate 0173e17
formatting fix
rasika-chivate a6dbb66
Update postgresql12_migration.md
rasika-chivate 0369647
Update postgresql12_migration.md
rasika-chivate a4325e6
Update postgresql12_migration.md
rasika-chivate 8bab491
Update postgresql12_migration.md
rasika-chivate 23a4e66
Update postgresql12_migration.md
rasika-chivate 4ce9eb2
Update postgresql12_migration.md
rasika-chivate bf2afd3
Update postgresql12_migration.md
rasika-chivate 3020605
Update postgresql12_migration.md
rasika-chivate 068b8ab
Update postgresql12_migration.md
rasika-chivate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| # 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. **Select a target version** - Choose the PostgreSQL version you want to migrate to (e.g., 15 or 16). Select a stable, supported release compatible with Percona Everest's infrastructure requirements. | ||
|
|
||
| 3. **Check Compatibility** - Verify that your configurations are compatible with the new PostgreSQL version. | ||
|
|
||
| 4. **Provision a new PostgreSQL database in Percona Everest** – Use Percona Everest to deploy a new database with the desired PostgreSQL version. | ||
|
|
||
|
|
||
| ## 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 | ||
|
|
||
| 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 [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). | ||
|
|
||
|
|
||
| ??? info "Comprehensive analysis of PostgreSQL migration techniques: Expand for a detailed comparison of logical dump vs replication →" | ||
|
|
||
| ### 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 replication" | ||
|
|
||
| ### 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. | ||
|
|
||
| 📚 Learn more | ||
|
|
||
| - [PostgreSQL documentation on logical replication](https://www.postgresql.org/docs/current/logical-replication.html). | ||
|
|
||
| === "Logical dump and restore" | ||
|
|
||
| ### Logical Dump and Restore | ||
|
|
||
| This option is recommended for **smaller databases** and **one-time migrations**. | ||
| {.power-number} | ||
|
|
||
| 1. Provision a new PostgreSQl database in Percona Everest. | ||
|
|
||
|
|
||
| 2. Perform a logical dump of the old database: | ||
|
|
||
| - Use [pg_dump or pg_dumpall](https://www.postgresql.org/docs/current/app-pgdump.html) to **export** your data from PostgreSQL 12. | ||
|
|
||
| ??? example "Example: Source database (PostgreSQL 12)" | ||
| Run the following command on the source database (PostgreSQL 12): | ||
|
|
||
| ```sh | ||
| pg_dump -Fc -h <old-db-host> -U <user> <db_name> -f dump_file.dump | ||
| ``` | ||
|
|
||
| 3. Restore data to the new Percona Everest database: | ||
|
|
||
| - 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 the newly created Percona Everest cluster. | ||
|
|
||
| ??? example "Example: Target database" | ||
| Run the following command on the target PostgreSQL database: | ||
|
|
||
| ```sh | ||
| pg_restore -U your_user -h new_db_host -d new_db_name -F c dump_file.dump | ||
| ``` | ||
|
|
||
| 4. Verify post-migration performance: | ||
|
|
||
| - Run queries to confirm [data integrity](https://www.postgresql.org/docs/current/applevel-consistency.html) and ensure compatibility. | ||
|
|
||
| 📚 Reference | ||
|
|
||
| - [PostgreSQL pg_dump documentation](https://www.postgresql.org/docs/current/app-pgdump.html) | ||
| - [PostgreSQL pg_restore documentation](https://www.postgresql.org/docs/current/app-pgrestore.html) | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.