PostgreSQL 18 changes and migration checklist
KakaoCloud now supports PostgreSQL 18.7. You can select version 18 when you create an instance group and configure it with a parameter group for that version.
If you’re moving from PostgreSQL 14 or 15, changes introduced in versions 16 and 17 also apply. Let’s look at how PostgreSQL 18 reads data and returns query results, then walk through the checks to make before moving your data and settings.
Changes in PostgreSQL 18
PostgreSQL 18 can issue multiple disk reads at once and return a row’s old and new values in a single query. If you’re moving from version 14 or 15, some settings for maintenance jobs and connection logging have also changed.
1. Performance
PostgreSQL 18 can issue multiple reads concurrently during sequential scans, bitmap heap scans, and VACUUM. This asynchronous I/O can reduce time spent waiting for disk reads.
Version 18 also adds B-tree skip scans for multicolumn indexes. Consider an index on branch and order date, in that order. If a query filters only by date and there are few distinct branches, PostgreSQL can jump to the requested date for each branch and skip unrelated index ranges.
2. SQL and functions
PostgreSQL 17 expanded MERGE to support views and a RETURNING clause. Use RETURNING merge_action() to see which action was taken on each row, or WHEN NOT MATCHED BY SOURCE to handle target rows with no match in the source.
In version 18, the RETURNING clause of INSERT, UPDATE, DELETE, and MERGE can reference both OLD and NEW. For example, adding RETURNING OLD.price, NEW.price to a price update returns the previous and updated prices in the same query.
Version 18 also adds uuidv7(), which generates time-ordered identifiers. Values generated close together in time tend to land near one another in a B-tree index, which can make inserts more efficient than with random UUID v4 values.
3. Database settings
When preparing a version 18 parameter group, start by comparing settings for maintenance jobs and connection logs. For example, you can now change autovacuum_max_workers without restarting the server, but the number of reserved slots still limits how many workers can run at once.
| Parameter | Versions 14, 15 | Version 18 | Notes |
|---|---|---|---|
maintenance_io_concurrency | 10 | 16 | PostgreSQL default changed |
log_connections | on/off (boolean) | List of strings | Allowed values: receipt, authentication, authorization, setup_durations, allEffective for new sessions |
autovacuum_max_workers | Restart required | Applied without restart | Concurrent worker limit: autovacuum_worker_slots |
maintenance_work_mem | Minimum 1MB | Minimum 64kB | Lower minimum |
autovacuum_work_mem | 0 ~ 1023 not allowed | 0 ~ 63 not allowed | -1 to use maintenance_work_mem |
Removed or renamed parameters (versions 16 and 17)
| Parameter | Removed in | Alternative |
|---|---|---|
force_parallel_mode | 16 | Renamed to debug_parallel_query |
lc_collate, lc_ctype | 16 | Current database values in pg_database.datcollate and pg_database.datctype |
vacuum_defer_cleanup_age | 16 | None |
db_user_namespace | 17 | None |
old_snapshot_threshold | 17 | None (feature removed) |
trace_recovery_messages | 17 | None |
New parameters and their defaults
Only major parameters are listed. For other new parameters, see the official PostgreSQL documentation.
| Category | Parameter | Default | Description |
|---|---|---|---|
| Memory and buffers | transaction_buffers | 0 (auto) | Buffer size for the transaction status (commit log) cache (unit: 8kB) |
subtransaction_buffers | 0 (auto) | Buffer size for the subtransaction cache (unit: 8kB) | |
commit_timestamp_buffers | 0 (auto) | Buffer size for the commit timestamp cache (unit: 8kB) | |
multixact_offset_buffers | 16 | Buffer size for the MultiXact offset cache (unit: 8kB) | |
multixact_member_buffers | 32 | Buffer size for the MultiXact member cache (unit: 8kB) | |
notify_buffers | 16 | Buffer size for the LISTEN/NOTIFY message cache (unit: 8kB) | |
serializable_buffers | 32 | Buffer size for the SERIALIZABLE transaction cache (unit: 8kB) | |
vacuum_buffer_usage_limit | 2MB | VACUUM/ANALYZE buffer ring limit (0 or at least 128kB) | |
| I/O | io_workers | 3 | Number of I/O worker processes when io_method=worker |
io_max_combine_limit | 128kB | Server-wide upper limit for io_combine_limit | |
| VACUUM | autovacuum_worker_slots | 16 | Number of slots reserved for Autovacuum workers (restart required) |
autovacuum_vacuum_max_threshold | 100,000,000 | Upper limit on the number of dead tuples that triggers Autovacuum, regardless of the table size ratio | |
vacuum_max_eager_freeze_failure_rate | 0.03 | Eager freeze failure threshold (stop when exceeded) | |
| Session and security | scram_iterations | 4096 | Number of iterations for SCRAM password hashing |
md5_password_warnings | on | Whether to display deprecation warnings when MD5 passwords are used |
For instructions on creating and managing parameter groups, see Parameter group. For notes on each parameter, see Parameter list.
Migration checklist
To move from PostgreSQL 14 or 15 to a new major version on KakaoCloud, create a version 18 instance group and migrate your data and settings. Before moving production data, use the new group to test your usual connection paths and scheduled jobs.
1. Authentication and drivers
PostgreSQL 18 still supports MD5 authentication, but support is scheduled for removal in a future major version. By default, PostgreSQL warns when you set an MD5 password with CREATE ROLE or ALTER ROLE. It does not warn at login. Before switching to SCRAM-SHA-256, check the drivers used by applications, batch jobs, monitoring tools, and connection pools that share the account.
| Driver | SCRAM-SHA-256 support |
|---|---|
libpq-based clients (psql, psycopg2, and others) | libpq 10 or later, as actually used by the client |
| PostgreSQL JDBC (pgJDBC) | JDBC 4.2 JAR 42.2.1 or later for Java 8+ Missing SCRAM classes in 42.2.0 |
| Other drivers (Npgsql, node-postgres, pgx, and others) | SCRAM-SHA-256 support in the installed version |
Once you’ve checked the drivers, reset the account password in a session with password_encryption set to scram-sha-256. Changing the setting alone leaves existing MD5 passwords in place. Once you reset a password, clients that lack SCRAM support can no longer open new connections with that account. Open a new connection from each client to verify authentication.
2. SQL and scheduled jobs
| What to check | What to test in the new instance group |
|---|---|
| Extensions | Installed extensions against the supported list SQL and scripts using old_snapshot in 15 (threshold removed in 17, extension unavailable in 18) |
| Connection initialization | Settings in SET and SHOW: force_parallel_mode renamed to debug_parallel_query, old_snapshot_threshold removed |
| Role management and triggers | From 16: ADMIN OPTION for a CREATEROLE account to alter or drop roles created by othersIn 18: AFTER trigger privileges at event time when using SET ROLE |
| Table maintenance | Child tables included in parent VACUUM and ANALYZE (ONLY for parent alone)UNLOGGED on individual partitions |
| Scheduled backups | Backup job’s pg_dump version (18 or later)Test backup on the new instance group |
See supported versions for the engines available when creating an instance group.
When moving an existing database to version 18 yourself, we recommend carefully reviewing it using the checklist introduced above. KakaoCloud is working to provide the optimal environment and technical support so that customers' databases can operate stably. If you have any questions or need support, please contact us anytime through the Helpdesk.
