Skip to main content
Service update

PostgreSQL 18 changes and migration checklist

· 7 min read
Kate (김소희)
Kate (김소희)
Service Manager
PostgreSQL

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.

ParameterVersions 14, 15Version 18Notes
maintenance_io_concurrency1016PostgreSQL default changed
log_connectionson/off (boolean)List of stringsAllowed values: receipt, authentication, authorization, setup_durations, all
Effective for new sessions
autovacuum_max_workersRestart requiredApplied without restartConcurrent worker limit: autovacuum_worker_slots
maintenance_work_memMinimum 1MBMinimum 64kBLower minimum
autovacuum_work_mem0 ~ 1023 not allowed0 ~ 63 not allowed-1 to use maintenance_work_mem

Removed or renamed parameters (versions 16 and 17)

ParameterRemoved inAlternative
force_parallel_mode16Renamed to debug_parallel_query
lc_collate, lc_ctype16Current database values in pg_database.datcollate and pg_database.datctype
vacuum_defer_cleanup_age16None
db_user_namespace17None
old_snapshot_threshold17None (feature removed)
trace_recovery_messages17None

New parameters and their defaults

Only major parameters are listed. For other new parameters, see the official PostgreSQL documentation.

CategoryParameterDefaultDescription
Memory and bufferstransaction_buffers0 (auto)Buffer size for the transaction status (commit log) cache (unit: 8kB)
subtransaction_buffers0 (auto)Buffer size for the subtransaction cache (unit: 8kB)
commit_timestamp_buffers0 (auto)Buffer size for the commit timestamp cache (unit: 8kB)
multixact_offset_buffers16Buffer size for the MultiXact offset cache (unit: 8kB)
multixact_member_buffers32Buffer size for the MultiXact member cache (unit: 8kB)
notify_buffers16Buffer size for the LISTEN/NOTIFY message cache (unit: 8kB)
serializable_buffers32Buffer size for the SERIALIZABLE transaction cache (unit: 8kB)
vacuum_buffer_usage_limit2MBVACUUM/ANALYZE buffer ring limit (0 or at least 128kB)
I/Oio_workers3Number of I/O worker processes when io_method=worker
io_max_combine_limit128kBServer-wide upper limit for io_combine_limit
VACUUMautovacuum_worker_slots16Number of slots reserved for Autovacuum workers (restart required)
autovacuum_vacuum_max_threshold100,000,000Upper limit on the number of dead tuples that triggers Autovacuum, regardless of the table size ratio
vacuum_max_eager_freeze_failure_rate0.03Eager freeze failure threshold (stop when exceeded)
Session and securityscram_iterations4096Number of iterations for SCRAM password hashing
md5_password_warningsonWhether 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.

DriverSCRAM-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 checkWhat to test in the new instance group
ExtensionsInstalled extensions against the supported list
SQL and scripts using old_snapshot in 15 (threshold removed in 17, extension unavailable in 18)
Connection initializationSettings in SET and SHOW: force_parallel_mode renamed to debug_parallel_query, old_snapshot_threshold removed
Role management and triggersFrom 16: ADMIN OPTION for a CREATEROLE account to alter or drop roles created by others
In 18: AFTER trigger privileges at event time when using SET ROLE
Table maintenanceChild tables included in parent VACUUM and ANALYZE (ONLY for parent alone)
UNLOGGED on individual partitions
Scheduled backupsBackup 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.

👉 Learn more about PostgreSQL
👉 PostgreSQL release notes