복원 문제: "invalid command \restrict"

"Discourse 3.5.0.beta9-dev - 04dbc622ab1e0197d16703ba47cf005ec93697ee"에서 현재 버전(6f06709643fa5e2253606c46f79d089ca3393ac9)으로 복원하는 데 문제가 있습니다.

[STARTED]
'system' has started the restore!
Marking restore as running...
Making sure /home/pfaffman/src/discourse-repos/discourse/tmp/restores/default/2025-10-28-201139 exists...
Downloading archive to tmp directory...
Extracting dump file...
Validating metadata...
  Current version: 20251024020353
  Restored version: 20250724012518
Enabling readonly mode...
Pausing sidekiq...
Waiting up to 60 seconds for Sidekiq to finish running jobs...
Creating missing functions in the discourse_functions schema...
Restoring dump file... (this may take a while)
invalid command \restrict
EXCEPTION: psql failed: invalid command \restrict

database_restorer에서 이 printf 명령어들을 제거하면 작동합니다:

      <<~CMD
        (
          printf '%s\\n' "\\\\restrict #{nonce}"
          #{sed_command}
          printf '%s\\n' "\\\\unrestrict #{nonce}"
        ) | #{self.class.psql_command} 2>&1
      CMD

이것은 아마도 이 커밋과 관련이 있는 것 같습니다.

백업이 생성된 버전(cdck 도커 컨테이너)에서는 다음과 같은 환경입니다:

PostgreSQL 15.13 (Debian 15.13-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit

그리고 복원을 시도하는 곳(베어 메탈에서 pg15를 실행 중인 개발 사이트)은 다음과 같습니다:

PostgreSQL 15.13 (Ubuntu 15.13-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit

이 코드가 무엇을 하려는 것인지 이해하지 못해서 혼란스럽습니다.

PG 15.14를 사용해야 하며, 모든 인스턴스가 해당 버전으로 업데이트되었는지 확인해야 합니다. 이 패치는 대규모 보안 문제를 수정합니다.

아하. 아주 간단한 설명이네요.

감사합니다. 바로 처리하겠습니다.