Why a Moodle database migration to PostgreSQL is a platform project, not a copy
Moving a Moodle site from Oracle or SQL Server to PostgreSQL is a platform project, and the effort depends on more than the database. The core Database transfer tool moves the data, but it does not move the rest of the platform with it. Expect effort to scale with site size, the number of installed plugins and any custom SQL written against the old engine. For Oracle sites, the transfer is needed before Moodle 5.0, so confirm the current support position in the Moodle 5.0 release notes and the Moodle releases page before you set a date.
The transfer is often done alongside a Moodle upgrade, which means the target stack has to be checked as a whole. Confirm the PostgreSQL version your target Moodle release requires, the PHP version and extensions, and whether each installed plugin supports both the target Moodle release and PostgreSQL. Review config.php for database settings, check the web server document root, and confirm file storage in moodledata, email, and the cron schedule. Each of these can fail after the data has moved, even when the transfer itself reports success.
Custom SQL in local plugins, reports, and themes is the item most likely to need rework, because Oracle and SQL Server syntax, identifier case rules and date functions do not carry over unchanged. Ask your Moodle partner or internal developers to list every place custom queries run, then plan tests for each report and block that reads from the database. Also plan the maintenance window around a verified backup and a rehearsal on a copy of production, so the cutover date rests on test results rather than on an estimate.
What maps cleanly from Oracle or SQL Server and what does not
This table compares the main database elements of a Moodle site on Oracle or SQL Server with their PostgreSQL or Moodle equivalent. Read the first column as the element to inventory, the second as what usually carries over, and the third as where rework and testing will be needed.
| Element | Typical handling | Migration notes |
|---|---|---|
| Moodle schema and tables | Moodle core tables are created by the Moodle database layer and carry across through the core Database transfer tool | Confirm the transfer tool reports no errors on the target version, then compare row counts for key tables such as users, courses and grades |
| Data types and character set | Text and Unicode data move through the transfer tool, but collation behavior can differ between engines | Check collation and character set settings on both sides and test sorting, search and case-sensitive comparisons on real course content |
| Users and roles | Database logins are not Moodle users; Moodle roles and capabilities live in Moodle tables and carry across | Recreate PostgreSQL roles and grants for the Moodle database account and any reporting or read-only accounts |
| Scheduled jobs | Moodle cron and scheduled tasks run from Moodle, not from the database engine's own job scheduler | Move any SQL Server Agent or Oracle scheduler jobs that touch Moodle tables and rebuild them against PostgreSQL before cutover |
| Stored procedures and triggers | Vendor-specific PL/SQL or T-SQL objects do not convert automatically | Inventory every custom object, rewrite it in PL/pgSQL, and test it, because these need rework and testing |
| Custom reports and views | Views and reports built directly on Moodle tables may use vendor SQL functions | Rewrite vendor-specific functions, retest each report output, and confirm that results match the source site |
| External database authentication or enrolment | Connection strings and queries point to the source engine and must be changed | Update the external database settings, validate the queries against PostgreSQL, and test sign-in and enrolment sync with sample accounts |
| External systems reading the database directly | Reporting tools, data warehouses or middleware that query Moodle tables often use engine-specific drivers and SQL | Treat each direct reader as a separate integration: confirm driver support, rewrite queries, and test them before the maintenance window |
| Moodle code and plugins | Core Moodle and most plugins run on any supported database, but some third-party plugins contain vendor-specific SQL | Check each plugin for hard-coded SQL and confirm it is supported on PostgreSQL before the transfer |
Documented tools and paths for the database move
The move has three layers: Moodle's own database transfer tool, the code and moodledata copy that travels with it, and PostgreSQL's upgrade and archiving tools that protect the rollback point. Each card below covers one of these layers or a check that sits between them, so the team can see which steps are documented and which need confirmation.
Core database transfer tool
Moodle core includes a Database transfer tool that moves the schema and data from one supported database engine to another. It is the main documented path for leaving Oracle or SQL Server. Confirm in the Moodle docs which engine pairs and Moodle versions the tool supports on your release, and run it against a copy of the site before any production window.
Moodle 5.1 notesPostgreSQL version for Moodle 5.1
Moodle 5.1 requires PostgreSQL 15 or later among its supported database engines, with PHP 8.2 or later. Check the exact PostgreSQL minimum on the release notes before you provision the target server, because the target version sets the upgrade path for everything after the move.
Moodle 5.1 notesPostgreSQL version for Moodle 5.3
Moodle 5.3 raises the PostgreSQL requirement to version 17 and requires PHP 8.3 or later. If you plan to land on 5.3 later, choose PostgreSQL 17 at the move rather than 15, so the database does not need a second engine upgrade soon after cutover. Confirm the current PostgreSQL support window before you commit to a version.
Moodle 5.3 notesCode and moodledata copy
The database transfer moves data only. The Moodle code directory and the moodledata directory, which holds uploaded files, caches and session data, must be copied to the new server with matching Moodle and plugin versions. Confirm with the Moodle docs which moodledata paths are safe to rebuild and which must be copied exactly, and check file ownership and permissions after the copy.
Search and replace for wwwroot
After the data lands, stored URLs in the database still point at the old host. The database search and replace tool updates them to the new wwwroot. From Moodle 5.1 the web server document root must point to the /public directory, so confirm that the new web server configuration matches before running the replacement. Check the Moodle docs for the exact steps and limits of this tool.
Moodle 5.1 notesPostgreSQL backups and rollback points
Take a full logical dump before cutover and keep it until the new site is accepted. PostgreSQL's upgrading guide describes pg_dumpall and restore, and its continuous archiving guide describes point-in-time recovery from a base backup plus WAL archives. Test one restore into a scratch server, because an untested backup is not a rollback point.
Continuous archiving docsSteps to confirm in Moodle docs
Some steps are not fully documented in the sources used for this page, including how the transfer tool handles custom plugin tables, collation and character set differences, and sequence values after load. Ask the Moodle docs or your own test run to confirm each one, and record the result in the cutover runbook before scheduling the maintenance window.
How the Database transfer tool moves data between engines
The Database transfer tool runs in a fixed sequence, and the first step sets how much data you can lose. It puts the site into maintenance mode so no user can write to the source database while it is read. It then reads the schema and data from Oracle or SQL Server and writes them into the PostgreSQL target, and finally it updates the site's configuration so Moodle connects to the new engine. Because writes stop only at the start, any change made after a table is read will be missing from the target. Confirm with your own change calendar that the window is frozen end to end, and take a fresh source backup before the run so the original database stays intact until every check below has passed.
Verification is where a transfer succeeds or fails, and a completed run message is not enough. Compare row counts for every table between source and target, then sample text and binary fields, since large text and stored files are where truncation and silent corruption tend to appear. Check character encoding by reading multilingual course content and forum posts, and confirm the target database uses UTF-8. Sequences need particular attention: they must be set above the highest migrated ID, or the next insert into a table will collide with an existing row. Last, open config.php and confirm that $CFG->dbtype names PostgreSQL and that the host and credentials point to the new server.
Before the maintenance window opens, match the tool to your Moodle version. The transfer tool ships in the Moodle code you run, so use the copy from your exact release and check its prerequisites in the Moodle documentation for that version. Then check the target engine. Moodle 5.1 requires PostgreSQL 15 or later, and Moodle 5.3 requires PostgreSQL 17, so if you plan to upgrade soon after the move, choose a PostgreSQL version that meets the later requirement now. Confirm that the PostgreSQL PHP driver is installed on every web and cron node in advance, because a missing driver fails the run after the freeze has already started. The Moodle 5.1 release notes list the server requirements for that release.
How the source, transfer, target and rollback paths fit together
The path starts at the live Moodle database on Oracle or SQL Server, which stays untouched while the core Database transfer tool copies it into a PostgreSQL target. The copy is then verified on a separate test site before anyone decides on cutover. If the test site or the cutover checks fail, the team returns to the source database, so the source must remain intact until the window closes. Check that the target and test site run the same Moodle version and that the rollback path is rehearsed before the window opens.
Source, transfer, verification, cutover and rollback paths for the database move.
The sequence from inventory to decommissioning the old database
The sequence moves the Moodle database to PostgreSQL in verified stages, so each step produces evidence that the next one depends on. The end state is a running PostgreSQL site, a documented cutover, and an Oracle or SQL Server database kept until the retention period you set has passed.
Inventory the current Moodle and its dependencies
Record the exact Moodle version, the database engine and version, every installed plugin with its version, any custom SQL in local code or reports, and each integration that reads or writes the database directly, such as an external database authentication or enrolment sync. DeployOpen's engineers typically run this with your Moodle administrators, and the output is a written inventory that lists what must be tested. The step is done when the inventory is signed off by the platform owner and each plugin has a known PostgreSQL compatibility status recorded in the Moodle plugins directory or by the plugin maintainer.
Build the PostgreSQL target at a supported major version
Provision a PostgreSQL server at a major version that is still supported on the date you plan to go live. The supported versions in the researched facts are 14 (to November 12, 2026), 15 (to November 11, 2027), 16 (to November 9, 2028), 17 (to November 8, 2029) and 18 (to November 14, 2030), so confirm the end-of-support date against the versioning policy before choosing. Match the PostgreSQL version to the Moodle release you run, since each Moodle release lists its own minimum PostgreSQL version. The step is done when the server is installed, configured for Moodle's required settings, and reachable from the Moodle application tier.
Run a test transfer on a copy of the database
Take a copy of the production Oracle or SQL Server database and the moodledata directory, then run Moodle's core Database transfer tool against the copy and the new PostgreSQL target. Record the start time, end time and every error or warning the tool reports, because these numbers are the basis for estimating the production window. The step is done when the transfer completes without unresolved errors and the row counts for the main tables match the source, which your engineers verify with queries against both databases.
Fix plugin, SQL and integration issues
Work through the failures from the test transfer and from the inventory. Typical findings include plugin tables that the transfer did not carry over as expected, custom SQL written for Oracle or SQL Server syntax, and integrations whose connection strings or drivers must change. Fixes are applied to the code and configuration first, then the test transfer is repeated from a fresh copy so that every fix is proven in a clean run. The step is done when a full transfer runs clean and the site loads, logs in, and completes the core workflows your teams named as critical.
Run a parallel test environment with full data
Stand up a separate Moodle on PostgreSQL with a full, recent copy of the data and the same plugin set as production. Run it alongside production for a defined period, with testers working through course delivery, grading, quizzes, cron tasks, backups and integrations. Checks should include the scheduled tasks and any sync jobs, which can fail quietly. The step is done when the business owners have signed off test cases and no open issue blocks cutover, and the sign-off record is kept with the migration documentation.
Execute the production maintenance window and cutover
Announce the window, stop user access, put Moodle into maintenance mode, and take a final full backup of the source database and moodledata. Run the transfer against production data, apply the verified configuration changes, update the web server and environment settings, and then bring the site back online. The window length should come from the timings of your own test runs, not from a general estimate, so add margin for the slowest test run and for rollback. The step is done when the site serves traffic from PostgreSQL and the cutover checklist is complete.
Complete post-cutover checks
After cutover, verify logins, course access, grade reports, file downloads, scheduled tasks, email delivery, integrations and the database backup job on the new engine. Compare the key counts against the final source snapshot and review Moodle's logs and the PostgreSQL logs for errors over the first working days. Keep the original source database in read-only mode so it can be used for comparison if a question arises. The step is done when the platform owner confirms the site is stable and the backup on PostgreSQL has been restored successfully in a test.
Decommission the old database after retention
Once the retention period you set has passed, export a final archive of the Oracle or SQL Server database, store it under your retention policy, and then remove the database instance, its service accounts and its backup jobs. The retention period is a decision for your organization and its compliance owners, so agree it before cutover and record it in the change record. The step is done when the archive is verified, access to the old database is removed, and the decommissioning record is signed by the owners.
Choosing the target PostgreSQL version and Moodle version together
This path keeps the current Moodle release and changes only the database engine. It is the smallest change set, so failures are easier to trace to the transfer itself. The main driver is usually the Oracle or SQL Server licensing or support position, or the Moodle 5.0 requirement for Oracle sites, not a wish to adopt new features. Because the code stays the same, your plugins, themes and custom code are the only application-side variables to test.
- Version floor check: Confirm that your current Moodle release supports PostgreSQL in the version you plan to run, and pick a PostgreSQL major version that is still in its support window for the length of your planned operation.
- Plugin compatibility: Confirm that each installed plugin runs on PostgreSQL, since some community plugins were written and tested only against MySQL or MariaDB or SQL Server.
- Custom SQL: Review local plugins and reports for raw SQL that assumes a specific engine.
- Rollback path: Keep the source database intact until the target passes acceptance testing.
Ask the platform owner whether the current Moodle release is on a supported branch and whether any planned upgrade is already scheduled for later.
This path combines the engine change with a Moodle upgrade. It is common when the current release is near end of support and the site must move anyway. Moodle 5.1 requires PostgreSQL 15 or later, and sites must already be on Moodle 4.2.3 or later to upgrade to it. Moodle 5.3 requires PostgreSQL 17 and upgrades only from 4.4 or later. Those floors decide whether the site can reach the target release in one step at all.
- Starting version gate: If the site is below the minimum version for the target release, step through an intermediate upgrade first, which adds a separate window.
- Two sets of breaking changes: Engine behavior differences and Moodle upgrade changes can both cause failures, so test them separately where possible.
- Server stack change: Moodle 5.1 also requires the web root to point to the
/publicdirectory, and PHP 8.2 or later. - Longer rollback: A failed combined change may need to restore both the database and the code.
Ask the platform owner which Moodle release is the target, whether the upgrade is already a planned milestone, and how much rollback time the window allows.
This path treats the migration as part of a new Moodle build, with new code, new server stack and a clean installation on PostgreSQL. Course content and users are then moved in with backup, restore and import tools instead of a whole-database transfer. It suits sites whose plugins, themes or configuration have accumulated problems, or where the old site should not be carried forward. It takes more design work up front, but it gives the team a deliberate choice of PostgreSQL version and Moodle version from the start.
- Target choice: Select the Moodle release and PostgreSQL major version together, with both within their support windows.
- Content transfer: Plan course backups, question banks and user loads as separate workstreams with their own checks.
- Plugin review: Rebuild only the plugins still needed, after vetting them against the new release.
- Parallel running: Plan how the old and new sites coexist during cutover.
Ask the platform owner which content and history must survive, and whether audit records from the old database must be kept in a readable form.
What drives the cost and duration of the move
This table lists the factors that change how much work the database move takes and how long the maintenance window must be. Read each row as a question to answer before requesting a quote, since the written scope, not a price list, sets the fee. The main takeaway is that the database size matters less than the custom SQL, external readers and plugin state around it.
| Driver | Why it matters | What to ask for in a quote |
|---|---|---|
| Database size and table count | Row volume sets the copy time for the Database transfer tool, and table count sets how many objects must be checked afterward. | A row count and size per largest table, plus the copy rehearsal timing on a non-production copy. |
| Plugins installed and their state | Each plugin must support the target engine and the Moodle version, and disabled or abandoned plugins can block the transfer or leave orphaned tables. | A plugin inventory listing version, maintainer status and whether the plugin runs on PostgreSQL. |
| Custom SQL and local queries | Hand-written SQL in local plugins, themes or reports often uses Oracle or SQL Server syntax and must be found and rewritten. | A search of the codebase for raw SQL and a list of items to rewrite or test. |
| Reports and external readers | Dashboards, data warehouses and BI tools that read the database directly need new connections, credentials and query checks after cutover. | An inventory of every system with database access, its owner and its query type. |
| External database authentication or enrolment | Sync jobs that read an external database depend on that connection and its credentials, and they must keep working through the change. | Confirmation of each external source, the sync schedule and the test plan for user and enrolment data. |
| File storage size in moodledata | The database move does not copy moodledata, but file storage size affects backup, transfer and verification time for the surrounding cutover. | The moodledata size, the file storage location and the plan for copying or mounting it on the new server. |
| Number of test environments | Each environment needs its own transfer rehearsal, data check and sign-off, so more environments means more repeated work. | How many environments are in scope, such as development, test, staging and production, and who signs off each. |
| Maintenance window the business accepts | A shorter accepted window usually requires more rehearsal and tighter planning of the final copy and cutover steps. | The window length the business has approved and the rollback point if the transfer does not finish in time. |
| Moodle version gap | Moodle 5.0 is required for Oracle sites before the transfer, and older starting versions may need staged upgrades first, which adds testing rounds. | The current Moodle version, the target version and any intermediate upgrade steps the vendor expects. |
What usually goes wrong during an engine change and how to prevent it
Most failed engine changes are not caused by the transfer tool itself. They come from plugins and custom code that assume the old engine, from data and integrations that keep moving after the copy starts, and from a rollback path that was never kept open. Each card below names one risk and the check that catches it before cutover.
Plugins without PostgreSQL support
Some plugins were written against Oracle or SQL Server behavior, ship only MySQL or MariaDB schemas, or have not been tested against the Moodle version you will run. Inventory every installed plugin and confirm its supported database engines and Moodle version range before the rehearsal. Remove or replace anything unmaintained, and treat a plugin that fails its install check on PostgreSQL as a blocker for cutover, not a warning.
- Minimum for 5.1
- PostgreSQL 15
Oracle or SQL Server syntax in custom code
Local plugins, custom reports, scheduled SQL and reporting tools often contain hand-written queries using vendor functions, quoting rules or date handling. These queries may run without error on the old engine and fail or return different results on PostgreSQL. Search custom code and report definitions for direct SQL, then run each report against the rehearsal database and compare row counts and totals with the source.
Encoding and collation differences
Character encoding and collation decide how text is sorted, compared and searched. A database created with one collation on the old engine may sort course names, usernames or forum posts differently on PostgreSQL, and search results can change. Confirm the database encoding and collation chosen for the target before the first copy, and test sorting and search on accented and non-Latin text that your users actually enter.
Data drift during a long window
If the old site keeps accepting writes while the copy runs, the new database starts out of date and grows more so every hour. Decide in advance whether the window is a full stop of logins, cron and writes, and state that rule to course teams. Plan a final delta check or a second copy immediately before cutover, and compare record counts in the main course, user, grade and log tables before you switch.
Forgotten cron and external integrations
Cron tasks, LTI tools, SSO connectors, enrolment syncs, reporting exports and backup jobs may still point at the old database host or credentials. Any of them that keeps running against the old engine can write data that never reaches the new site. Build a list of every job and external connection from the configuration and the scheduler, assign an owner to each, and disable or repoint them as part of the cutover runbook.
Weak rollback planning
A rollback needs the old database to remain intact and reachable until the new site is accepted. Teams that drop, overwrite or archive the source too early lose the ability to return to a known-good state if a defect appears days later. Keep the source read-only and backed up, record the exact point of cutover, and set the acceptance criteria and the date after which the old engine can be retired. PostgreSQL high availability tools do not decide this for you, so document the recovery path explicitly.
Continuous archiving docsQuestions buyers ask before moving Moodle to PostgreSQL
How much does it cost to move Moodle from Oracle or SQL Server to PostgreSQL?
The cost is driven mostly by the work around the database copy, not the copy itself. Your internal staff are paid for planning, test sign-off and cutover, and any external engineering is paid according to the written scope. Other cost components include test environment hosting, rewriting custom SQL, and fixing or replacing plugins that depend on the source engine. Planning, rehearsals and cutover are one-time costs, while the PostgreSQL server you run afterward carries recurring costs for backups, monitoring and patching. Ask for a quote that lists each item separately, states how many full rehearsals are included, and explains how custom SQL problems found during testing would be priced.
How long does a Moodle database transfer take and what sets the maintenance window?
The duration depends on database size, the number of rehearsals before cutover, and how long functional testing takes to pass. The maintenance window covers the final data copy while the site is closed to users, plus verification, configuration changes and a restart of cron and caches. Moodle data files in moodledata are not part of the database copy, so their transfer time must be measured separately if they move too. The most reliable way to size the window is to rehearse the full process on a copy of production data and time each step. Ask your partner or internal team to publish those rehearsal timings before agreeing to a cutover date.
What must our team provide before a Moodle PostgreSQL migration starts?
The work depends on access and inventories that only your team can supply. Plan to provide the following before the first rehearsal:
- Read access to the source database and an administrator account for the target PostgreSQL server.
- Test environments with a copy of the Moodle code and moodledata that match production.
- A plugin list with exact versions and the source of each plugin.
- A custom SQL inventory covering reports, blocks, local plugins and any external tools that read the database directly.
- Named sign-off owners for teaching, grading, enrolment, reporting and SSO tests.
- An approved change window, a backup retention rule and an agreed cutover decision maker.
Missing items on this list are the most common reason rehearsals slip, so confirm each one in writing at scoping.
Can our internal team move Moodle to PostgreSQL without an outside partner?
A competent internal team can do the move if it already administers Moodle and has working knowledge of Linux, PostgreSQL and backup and restore. Team members need to learn how PostgreSQL handles roles, schemas, collations and permissions, how Moodle's database driver settings map to PostgreSQL, and how to confirm sequences and indexes after the copy. They also need to write and run verification queries against both engines, since Moodle's own checks do not prove that custom SQL still returns the same results. The version requirements add a dependency: Moodle 5.1 requires PostgreSQL 15 or later and Moodle 5.3 requires PostgreSQL 17 or later. If the team lacks any of these skills, a scoped partner engagement can cover the gap while your staff keep the knowledge.
Can we keep the old Oracle or SQL Server database for rollback?
Yes. Keep the source database intact, and put it into read-only mode once the final copy is taken, so it stays available until the new site passes sign-off. Rollback means pointing the configuration back to the old engine, but any grades, enrolments or submissions entered on the new site after cutover would be missing from the old database unless you reconcile them. Decide in advance how long the old database will be kept, who can authorize rollback, and the last point at which rollback is still simple. Keep a separate backup of both the source database and the target database at cutover, so the rollback path does not depend on a single copy.
Should we upgrade Moodle at the same time as moving the database?
In most cases the two changes should be separate, because combining them makes each failure harder to trace. Moodle 5.1 requires sites to be on Moodle 4.2.3 or later before upgrading, and Moodle 5.3 requires Moodle 4.4 or later. If your site is older than the minimum for the target release, the upgrade path may force a staged route, and the database move may have to be sequenced around those stages. A sound approach is to move the database on your current version, verify the site, and then upgrade in a later window with its own rehearsal. Combine the steps only when the target release's engine requirement leaves no other option, and ask for both sequences in writing.
Which PostgreSQL version should we target for a Moodle migration?
Choose a PostgreSQL version that meets the minimum for your planned Moodle release and is still inside its support window on the date you expect to run production. Moodle 5.1 requires PostgreSQL 15 or later, and Moodle 5.3 requires PostgreSQL 17 or later. PostgreSQL 18 is supported to November 14, 2030, 17 to November 8, 2029, 16 to November 9, 2028, 15 to November 11, 2027, and 14 to November 12, 2026, so a new production build on 14 would have little support time left. Confirm the current support dates in the PostgreSQL versioning policy before you commit, and plan the later PostgreSQL major upgrade as its own project.
How do we check that the migrated Moodle returns the same results?
Verification should compare the old and new sites on data, behavior and integrations, not just on whether the site loads. Compare row counts and checksums for key tables such as users, enrolments, grades, quiz attempts and logs, and run the same course reports on both engines. Test gradebook calculations, quiz timing, assignment submissions, file links, cron tasks and sessions, and every SSO or external database connection. Run each custom SQL query and compare output with the source engine, since SQL that works on one engine can behave differently on another. Record each test result with the name of the sign-off owner before cutover, so the verification evidence is available to auditors and to the next rehearsal.
Running PostgreSQL in production after the move
Once the Moodle data is loaded into PostgreSQL, the first decisions are about how the database stays available and recoverable. PostgreSQL can run a hot standby that serves read-only queries, and it supports both synchronous replication, where a commit waits for standbys, and asynchronous replication. Synchronous replication protects committed course submissions and grades from loss on failover but adds latency to every write, while asynchronous replication keeps writes fast and accepts that the newest transactions may be lost. Decide which trade-off your grade and submission data can tolerate before the cutover, and test it with a realistic Moodle write load in the staging copy.
Plan failover explicitly. PostgreSQL does not detect a failed primary or notify a standby to take over, so automatic failover depends on external tooling that you select, configure and test. Point-in-time recovery needs continuous archiving of WAL files, and a base backup taken on a schedule. Restore a copy to a separate host and confirm that Moodle starts against it, because a backup that has never been restored is not evidence of recovery. Connection pooling with PgBouncer sits in front of the database to limit connection counts from PHP workers, and its pooling mode must be checked against the session behavior Moodle relies on.
Settle authentication before go-live. PostgreSQL offers password, GSSAPI, LDAP, certificate, PAM and OAuth methods in pg_hba.conf, and password authentication should use SCRAM rather than the deprecated MD5 method. Certificate-based access suits the web tier and administrators who connect with fixed identities. For upgrades, confirm the release you run is still supported (PostgreSQL 17 is supported until November 2029), then choose between pg_upgrade, a dump and restore, or logical replication, which the PostgreSQL documentation describes as allowing a major upgrade with only several seconds of downtime. Confirm the exact downtime for your environment with a rehearsal.
How DeployOpen scopes, delivers and supports the Moodle database move
DeployOpen plans the move from Oracle or SQL Server to PostgreSQL as a fixed-scope piece of work inside your own infrastructure, starting from a written inventory of your Moodle version, plugins and database. The engagement covers the transfer, the target PostgreSQL build, testing and the cutover window, and it ends with documented handover.
How we scope
- Confirm the current Moodle version and the target version, since Moodle 5.1 and 5.3 set different PostgreSQL and PHP minimums.
- Inventory installed plugins, custom code and database-specific SQL that the transfer tool must handle.
- Agree in writing the maintenance window, rollback point, test sites and the acceptance criteria for cutover.
How we build
- Stand up the target PostgreSQL server and Moodle stack in your environment, with the database engine version matched to the Moodle release.
- Run the core Database transfer tool against a copy of the live database, then review row counts and sample course data.
- Test logins, gradebook, quizzes, file access and cron on a staging site before any change to production.
How we hand over
- Deliver a runbook covering the exact cutover steps, timing checks, configuration keys and rollback procedure.
- Document the PostgreSQL settings, connection details, backup jobs and the restore test results for your team.
- Walk your administrators through the post-move checks so they can run the next maintenance window themselves.
How we support
- Provide a post-cutover review of logs, cron tasks and performance against the agreed acceptance criteria.
- Offer ongoing support, upgrades and continuous testing as a retainer if you want DeployOpen to keep the platform current.
- Ask any quote to itemize scoping, build, testing, handover and retainer effort so the cost drivers stay visible.

