Loading...

By: Dervish

More and more enterprises are finding that the high licensing costs, strong vendor lock-in, and complex operation and maintenance processes of Oracle databases can no longer meet the cost control and agility requirements of the cloud-native era. As a mature managed relational database service in the AWS ecosystem, Amazon RDS for PostgreSQL has become the preferred target for enterprises to break away from Oracle constraints, thanks to its fully managed operations, elastic scalability, and open-source compatibility. However, migrating from Oracle to Amazon RDS PostgreSQL is not a simple data transfer. Schema differences, PL/SQL code adaptation, and zero-downtime business requirements all require professional migration tools and strategies to achieve a smooth transition.How to Migrate Oracle to Amazon RDS PostgreSQL

Core Value Analysis of Amazon RDS for PostgreSQL

Amazon RDS for PostgreSQL is a fully managed database service built by AWS based on open-source PostgreSQL. It retains the open-source features and compatibility of PostgreSQL while adding the advantages of AWS cloud services, providing enterprises with an out-of-the-box database solution without the need to focus on underlying infrastructure management.

Key Reasons Enterprises Choose RDS for PostgreSQL

  • Significantly Reduced Operational Burden: AWS automatically handles database backups (supporting point-in-time recovery), version patching, multi-AZ deployment, and failover, reducing enterprises’ database operation workload by more than 70%.
  • Distinct Cost Advantages: It adopts pay-as-you-go or reserved instance models with no Oracle-style upfront licensing fees. For small and medium-sized workload scenarios, the total cost of ownership (TCO) is 40%-60% lower than that of Oracle.
  • High Availability and Elasticity Guarantee: It supports cross-AZ deployment with a failover time usually less than 60 seconds. Storage can be automatically scaled up to 64 TB, and it supports up to 15 read replicas to easily handle business traffic fluctuations.
  • Open-Source Ecosystem Compatibility: It perfectly supports mainstream extensions such as PostGIS (spatial data processing), pg_partman (partition management), and pg_stat_statements (performance monitoring), and is compatible with open-source ETL tools and developer habits.

These features make RDS for PostgreSQL an ideal target for enterprises migrating from Oracle. But before the actual migration, it is also necessary to clarify the differences between it and Aurora PostgreSQL, another PostgreSQL-compatible service of AWS, to avoid selection deviations.

Amazon RDS for PostgreSQL vs. Aurora PostgreSQL

AWS offers two PostgreSQL-compatible services, both built based on open-source PostgreSQL, but there are obvious differences in architectural design, performance, and cost. Enterprises need to choose according to their own business scale and requirements.

Consideration Factor

Scenarios for Prioritizing RDS for PostgreSQL

Scenarios for Prioritizing Aurora PostgreSQL

Cost Control

Small and medium-sized businesses, department-level applications, or test environments pursuing low TCO

Enterprise core businesses, high-concurrency scenarios where higher costs are acceptable for better performance

Business Scale

Single-instance data volume < 10 TB, daily transaction volume < 1 million

Single-instance data volume > 10 TB, daily transaction volume > 1 million

Architecture Complexity

Prefer simple deployment without the need for distributed storage or cross-region synchronization

Need distributed storage, global multi-region deployment, or second-level cross-region replication

Performance Requirements

Medium read/write performance without extreme low-latency requirements (millisecond-level response is sufficient)

High read/write performance requirements, needing microsecond-level response or high-throughput support

For example, a regional inventory management system of a retail enterprise with a small data volume and high cost sensitivity is suitable for RDS for PostgreSQL; while a core transaction system of a financial enterprise requiring high availability and low latency is more suitable for Aurora PostgreSQL. After clarifying the selection, enterprises also need to address various technical challenges during the migration process.

RDS for PostgreSQL vs. Aurora PostgreSQL

Challenges of Migrating from Oracle to AWS RDS

Migrating from Oracle to RDS PostgreSQL is essentially a technology stack switch from a “closed-source commercial database” to an “open-source managed database”. The differences between the two in data types, syntax rules, and functional features will bring multi-dimensional migration challenges.

  1. Schema and Data Type Adaptation Challenges

►When mapping Oracle’s NUMBER type (supporting arbitrary precision) to PostgreSQL’s NUMERIC type (with limited default precision), precision loss is prone to occur. There are differences in storage logic between CLOB/BLOB types and PostgreSQL’s TEXT/BYTEA types, which require additional processing.

►Different case sensitivity rules: Oracle is case-insensitive to table/column names by default, while PostgreSQL is case-sensitive by default. If not configured in advance, queries will fail after migration.

  1. PL/SQL Code Refactoring Pressure

►Oracle relies on PL/SQL to implement stored procedures, triggers, and functions, while PostgreSQL uses PL/pgSQL. The two have similar syntax but are incompatible (such as the difference between Oracle’s %ROWTYPE and PostgreSQL’s RECORD type).

►If an enterprise has a large amount of historical PL/SQL code (such as risk control calculation logic in the financial industry), manual refactoring will consume a lot of development resources and is prone to introducing bugs.

  1. Partitioning and Index Strategy Adaptation Issues

►Oracle supports various advanced partitioning strategies such as range partitioning, hash partitioning, and list partitioning. Some strategies (such as interval partitioning) need to be implemented through extensions (such as pg_partman) in PostgreSQL and cannot be migrated directly.

►Index type differences: Oracle’s bitmap index has no corresponding type in PostgreSQL and needs to be replaced with B-tree index or GIN index, which may affect query performance.

  1. Mass Data Migration and Synchronization Challenges

►If the Oracle database has a data volume of TB level, the traditional batch export (such as expdp) + import (such as psql) method is time-consuming (it may take more than 24 hours). During this period, the business cannot be interrupted, which is likely to lead to data inconsistency between the source database and the target database.

►Oracle data continues to change during migration (such as new orders and updated user information). Real-time change capture and synchronization to RDS are required; otherwise, the problem of “data expiration as soon as migration is completed” will occur.

  1. Difficulty in Meeting Zero-Downtime Business Requirements

►Core businesses (such as e-commerce transactions and payment systems) cannot afford long-term downtime. If the “stop service first, then migrate” method is adopted, it will directly affect revenue and user experience. However, traditional tools are difficult to achieve “non-stop service synchronization”, resulting in high downtime risks.

If these challenges are only solved by manual work or basic tools, it will not only extend the migration cycle (which may drag on from weeks to months) but also may cause data loss, performance degradation, and other problems. At this time, choosing a suitable migration tool has become the key to breaking through the bottleneck. Traditional migration solutions often have obvious limitations and are difficult to cover the core needs of enterprises.

Traditional Oracle to Amazon RDS PostgreSQL Migration Solutions

In the initial stage of migration, enterprises often try to use AWS native tools, manual operations, or third-party commercial tools, but these solutions often show problems of low efficiency and high risk when dealing with complex scenarios.

  1. AWS SCT + DMS Solution: Insufficient Adaptability

►Working Logic: Scan Oracle schema through SCT and convert it into PostgreSQL format, then complete batch data migration and CDC synchronization through DMS.

►Limitations: The conversion rate of SCT for complex PL/SQL code is less than 50%, requiring a lot of manual code rewriting. DMS is prone to synchronization delays in high-concurrency scenarios (such as peak transaction volume > 10,000 transactions/second) and does not support automatic handling of schema changes.

  1. Manual Export and Import: Only Suitable for Small-Scale Scenarios

►Working Logic: Export data as dump files through Oracle’s expdp tool, then import them into the target database through PostgreSQL’s psql tool.

►Limitations: Only applicable to non-core scenarios with data volume < 100 GB; long downtime (it takes hours for 100 GB of data); no change synchronization capability; new data in the source database during migration needs to be manually supplemented.

  1. Custom ETL Pipeline: High Maintenance Cost

►Working Logic: Write scripts based on Python/Java, or use ETL tools such as Talend and Informatica to implement the “extract-transform-load” process.

►Limitations: Long development cycle (2-4 weeks are needed to build a basic pipeline); only supports batch synchronization, not real-time CDC; scripts need to be modified again when the schema changes, resulting in high maintenance costs.

  1. Third-Party Commercial Tools (e.g., GoldenGate, HVR): Excessively High Cost

►Working Logic: Capture Oracle changes through log parsing technology, synchronize them to RDS PostgreSQL in real time, and support complex data conversion.

►Limitations: Annual licensing fees can reach hundreds of thousands or even millions of yuan, offsetting the cost advantages of migrating from Oracle. The integration with the AWS ecosystem is low (such as inability to automatically adapt to RDS parameter configuration), requiring additional development of adaptation modules.

The common problem of traditional solutions is that they cannot meet the four core requirements of “real-time synchronization”, “low code”, “low cost”, and “zero downtime” at the same time. For example, DMS can achieve CDC but has poor adaptability; GoldenGate has complete functions but high cost; manual operation has low cost but is only suitable for small scenarios. These limitations make enterprises realize that they need a migration tool specially designed for the “Oracle to RDS PostgreSQL” scenario. i2Stream from information2 software is a solution launched to address these pain points.

Why Choose i2Stream to Migrate Oracle Database to AWS RDS PostgreSQL?

Unlike traditional tools, i2Stream is a real-time data integration platform launched by information2 software, specially designed for enterprise-level database migration, especially suitable for the scenario of migrating from Oracle to Amazon RDS for PostgreSQL. It can solve the pain points of traditional solutions through “unified pipeline + intelligent adaptation” and achieve the migration goal of “near-zero downtime, no code, and high reliability”.

  • Supported Versions: Compatible with Oracle 11g and above (including container instances CDB and non-container instances Non-CDB), and supports RDS PostgreSQL 11.x-16.x versions.
  • Synchronization Performance: Single data stream throughput reaches 7GB+/s, and CDC synchronization latency is < 100ms, meeting the needs of fast migration and real-time synchronization of TB-level data.
  • Data Consistency: Adopts the “exactly-once” delivery mechanism to ensure 100% consistency between Oracle and RDS PostgreSQL data without duplication or loss.
  • Security Features: Supports TLS 1.3 encryption at the transport layer and AES-256 encryption at the storage layer. It supports private network connection methods such as VPC Peering, PrivateLink, and SSH tunnels, complying with compliance requirements of industries such as finance and healthcare.
  • Configuration Efficiency: Full UI visual operation, no need to write code, and the pipeline of “Oracle source – RDS target” can be built within 5 minutes, reducing operation and maintenance thresholds.
FREE Trial for 60-Day

i2Stream – Achieving Smooth Migration from Oracle to Amazon RDS PostgreSQL

  1. Oracle Source Capture

►Read Oracle archive logs through LogMiner technology, and complete “historical data backfill” and “real-time change capture” at the same time without splitting into two tools.

►Automatically identify the schema structure and data types of Oracle, intelligently map them to PostgreSQL (such as automatically adjusting NUMBER type precision and handling case issues), reducing manual intervention.

  1. RDS PostgreSQL Target Materialization

►Automatically create target tables in RDS PostgreSQL (matching the table structure and indexes of Oracle), and support custom schema mapping (such as mapping the “SCOTT” user table of Oracle to the “public” schema of PostgreSQL).

►Provide “Delta Updates” and “Hard Deletes” functions to ensure that the add, delete, and modify operations of the source database are synchronized to the target database in real time.

  1. Business Cutover and Monitoring

►During migration, i2Stream keeps Oracle and RDS PostgreSQL data synchronized continuously. Enterprises can verify the data accuracy of the target database at any time (such as comparing data of both ends through the data verification function).

►Only 1-2 minutes of Oracle write suspension is required during cutover (to ensure the synchronization of the last batch of changes), and then the business traffic can be switched to RDS PostgreSQL, achieving near-zero downtime.

i2Stream vs. Traditional Solutions

  • Zero-Code Configuration: No need to write migration scripts or CDC code, all configurations are completed through the UI interface, reducing technical thresholds and suitable for operation by non-professional database teams.
  • Automatic Schema Adaptation: Built-in Oracle-PostgreSQL data type mapping library, automatically handles differences in case, precision, partitioning strategies, etc., reducing more than 90% of manual adaptation work.
  • Enterprise-Grade Reliability: Supports high-availability deployment (multi-node redundancy), automatically retries after synchronization interruption without losing any data, and provides complete migration logs for easy troubleshooting.

For enterprises facing migration challenges, i2Stream can not only solve technical pain points but also shorten the migration cycle and reduce migration costs.

Step by Step: Oracle to Amazon RDS PostgreSQL Tutorial

Migrating an Oracle database to Amazon RDS PostgreSQL can be a complex task, but using i2Stream from information2 Software can simplify this process. Below are the basic steps for using i2Stream to perform the migration:

Step 1. Environment Preparation:

►Ensure network connectivity between the source (Oracle) and target (Amazon RDS PostgreSQL) environments.

►Install the i2Stream client on the source end.

►Configure the Amazon RDS PostgreSQL instance to meet the migration requirements.

Step 2. Configure i2Stream:

►According to the documentation, configure i2Stream by specifying the connection details of the source database (Oracle), such as IP address, port, username, password, etc.

►Specify the connection details of the target database (Amazon RDS PostgreSQL).

►Set the tables or schemas that need to be synchronized.

Step 3. Data Initialization:

►Use the data initialization feature of i2Stream to migrate data from Oracle to PostgreSQL in a single operation. This step is typically performed during a low-traffic period to minimize impact on the production system.

Step 4. Incremental Synchronization:

►Enable the incremental synchronization feature of i2Stream to capture changes on Oracle and sync them in real-time to PostgreSQL starting from the completion of data initialization.

Monitor the synchronization status to ensure data consistency.

Step 5. Switch Application:

►Once it is confirmed that the data has been fully synchronized and is consistent, switch the application’s database connection to the new PostgreSQL database at an appropriate time.

Perform necessary tests to ensure the application runs smoothly.

Step 6. Validation and Optimization:

►After the switch, continuously monitor the performance of PostgreSQL and adjust parameter settings as needed.

►Conduct performance testing on the application to ensure the migrated system meets performance requirements.

🌟Tip:

For more detailed steps on how to use i2Stream, please watch this video. If you’d like to learn more, please request a demo.

Post-Migration Optimization Suggestions

After completing the migration from Oracle to RDS PostgreSQL, enterprises also need to optimize the target end to ensure stable business performance. At the same time, common questions during the migration process need to be clarified in advance to avoid subsequent operation and maintenance risks.

  • Performance Optimization: Adjust RDS parameters according to business load (such as setting shared_buffers to 25% of memory, adjusting work_mem according to query complexity); create appropriate indexes (such as creating B-tree indexes for high-frequency query fields and GIN indexes for multi-field queries).
  • Operation and Maintenance Optimization: Enable automatic RDS backups (set backup retention period ≥ 30 days), turn on performance monitoring (monitor CPU utilization, connection count, and query latency through CloudWatch); regularly execute VACUUM operations to optimize PostgreSQL storage space.
  • Extension Adaptation: If the business needs spatial data processing, the PostGIS extension can be enabled; if partition management is required, the pg_partman extension can be installed to improve query efficiency of massive data.

Conclusion

Migrating from Oracle to Amazon RDS for PostgreSQL is an important step for enterprises to reduce IT costs, get rid of vendor lock-in, and embrace the open-source ecosystem. However, the technical challenges during the migration process (such as schema adaptation, PL/SQL refactoring, and zero-downtime requirements) are difficult to solve efficiently only by traditional tools. i2Stream from information2 software provides enterprises with a simpler and more reliable migration solution through the core capabilities of “real-time CDC + automatic adaptation + zero-code configuration”, helping enterprises shorten the migration cycle and reduce operation and maintenance risks.

If your enterprise is planning to migrate from Oracle to RDS PostgreSQL, you can start with the following actions:

  1. Visit the official website of information2 software to apply for a 60-day free trial of i2Stream and experience the zero-code migration process.
  2. Contact support from i2expert to obtain a customized migration solution (such as multi-tenant Oracle migration, cross-region RDS deployment and other scenarios).
{{ author_info.name }}
{{author_info.introduction || "No brief introduction for now"}}

More Related Articles

Table of Contents:
Stay Updated on Latest Tips
Subscribe to our newsletter for the latest insights, news, exclusive content. You can unsubscribe at any time.
Subscribe
Ready to Enhance Business Data Security?
Start a 60-day free trial or view demo to see how Info2Soft protects enterprise data.
{{ country.name }}
Please fill out the form and submit it, our customer service representative will contact you soon.
By submitting this form, I confirm that I have read and agree to the Privacy Notice.
{{ isSubmitting ? 'Submitting...' : 'Submit' }}