호환성 수준 / 기능 버전 설정
Oracle
-- Raise the COMPATIBLE initialization parameter (irreversible!):
ALTER SYSTEM SET COMPATIBLE = '19.0.0' SCOPE=SPFILE;
-- Then restart the instance. To see the current value:
SHOW PARAMETER compatible;COMPATIBLE 파라미터는 어느 버전의 기능과 파일 형식을 활성화할지 결정한다. 한 번 올리고 인스턴스를 재시작하면 되돌릴 수 없다(다운그레이드 차단). 따라서 업그레이드 성공이 확인될 때까지 단계적으로 올린다.
PostgreSQL
# Not applicable: PostgreSQL has no database compatibility level.
# If legacy behavior is needed, set the relevant GUCs (e.g. SET standard_conforming_strings=off)
# or manage the major migration with dump/restore.PostgreSQL에는 SQL Server/Oracle 같은 '호환성 수준' 개념이 없으며, 버전 동작은 바이너리 버전에 직접 묶여 있다. 버전 간 이전은 pg_dump/pg_restore 또는 pg_upgrade로 수행한다.
MySQL
# Not applicable: MySQL has no configurable database compatibility level.
# Behavioral differences are managed with sql_mode:
SET GLOBAL sql_mode = 'STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION';MySQL에는 버전 기반 호환성 수준이 없으며, SQL 동작은 주로 바이너리 버전과 sql_mode 설정에 따라 달라진다. 레거시 애플리케이션 동작을 유지하려면 sql_mode를 세밀하게 조정한다.
SQL Server
-- Set the database compatibility level (e.g. SQL Server 2022 = 160):
ALTER DATABASE Sales SET COMPATIBILITY_LEVEL = 160;
-- To see the current value:
SELECT name, compatibility_level FROM sys.databases;COMPATIBILITY_LEVEL은 쿼리 옵티마이저와 언어 기능이 어느 버전처럼 동작할지 결정한다(150=2019, 160=2022). 인스턴스를 업그레이드한 후에도 데이터베이스는 이전 수준에 머무를 수 있으며, 단계적으로 올리면서 실행 계획 회귀를 모니터링하는 것이 권장된다. 다시 낮출 수 있다.
MongoDB
// Set the Feature Compatibility Version (FCV):
db.adminCommand({ setFeatureCompatibilityVersion: "7.0", confirm: true })
// Read the current value:
db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })FCV는 버전과 함께 도입되는 영구 데이터 형식 변경과 새 기능이 언제 활성화될지 제어한다. 바이너리 업그레이드 후 클러스터가 안정된 상태에서 올린다. 낮추는 것은 같은 바이너리 버전이 낮은 FCV를 계속 지원하는 경우에만 가능하다.
Redis
# Not applicable: Redis has no compatibility level / feature version concept.
# Behavior depends directly on the running binary version.Redis에는 설정 가능한 호환성 수준이 없으며, 기능 집합은 전적으로 실행 중인 버전에 따라 달라진다. 호환성은 RDB/AOF 파일 형식 수준에서 상위 방향으로만 유지된다.
Elasticsearch
# Not applicable: Elasticsearch has no configurable compatibility level.
# An index is tied to the format of the version it was created in; very old indices
# cannot be read in the new version and require a reindex.Elasticsearch에는 호환성 수준 설정이 없으며, 각 인덱스는 생성된 메이저 버전의 형식을 가진다. 이전 메이저 버전에서 생성된 인덱스는 읽을 수 있지만, 그보다 오래된 인덱스는 _reindex로 새 버전에 옮겨야 한다.