PostgreSQL 15 업데이트

:warning: 주의! 데이터베이스가 매우 큰 경우, 상당한 추가 디스크 공간(데이터베이스 크기의 2배)이 필요하며 이 업그레이드를 수행할 때 매우 주의해야 합니다!

Docker 이미지를 PostgreSQL 15로 업그레이드하기 위한 변경 사항이 적용되었습니다. 커맨드 라인에서 Discourse를 다시 빌드하는 사이트 관리자는 이전의 PostgreSQL 13에서 PostgreSQL 15로 업그레이드됩니다. 참고로, 2020년에 PostgreSQL 13 업데이트가 실시되었을 때 업그레이드를 보류했다면, 해당 업그레이드를 건너뛰고 바로 PostgreSQL 15로 이동할 수 있습니다.

이전에 업그레이드를 보류했다면, app.yml의 PostgreSQL 템플릿을 templates/postgres.12.template.yml에서 templates/postgres.template.yml로 변경해야 합니다.

어떤 업그레이드든 마찬가지이지만, 작업을 수행하기 전에 백업을 만드는 것이 강력히 권장됩니다.

업데이트

공식 설치 가이드 (단일 컨테이너)

다음 재빌드 시 끝에 다음과 같은 메시지가 표시됩니다:

-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES COMPLETE

Old 13 database is stored at /shared/postgres_data_old

To complete the upgrade, rebuild again using:

./launcher rebuild app
-------------------------------------------------------------------------------------

이는 업그레이드가 정상적으로 완료되었음을 의미합니다! 사이트를 다시 실행 상태로 만들려면 새로운 재빌드를 실행하기만 하면 됩니다.

데이터 컨테이너 설치

discourse_docker 저장소에 포함된 샘플을 기반으로 한 전용 데이터 컨테이너가 있는 설정을 사용하는 경우, PostgreSQL을 안전하고 깨끗하게 종료하는 것이 중요합니다.

요즘에는 수 분 동안 실행되는 쿼리를 사용하는 백그라운드 작업이 있으므로, 웹 컨테이너를 종료하면 데이터 컨테이너가 안전하게 종료되는 데 도움이 됩니다.

./launcher stop web_only
./launcher stop data
./launcher rebuild data
./launcher rebuild data
./launcher rebuild web_only

데이터 컨테이너에 대한 첫 번째 재빌드를 실행하기 전에, PostgreSQL 로그를 tail하여 올바르게 종료되었는지 확인할 수 있습니다.

tail -f shared/standalone/log/var-log/postgres/current을 실행하면, 깨끗하게 종료된 경우 다음과 같은 로그가 표시됩니다:

2025-01-24 09:19:06.437 UTC [37] LOG:  received smart shutdown request
2025-01-24 09:19:06.444 UTC [37] LOG:  background worker "logical replication launcher" (PID 54) exited with exit code 1
2025-01-24 09:19:06.446 UTC [49] LOG:  shutting down
2025-01-24 09:19:06.468 UTC [37] LOG:  database system is shut down

수동 업데이트 / 공간이 제한된 환경

:warning::warning::warning:
이 작업을 시도하기 전에 반드시 POSTGRES_DATA를 백업해야 합니다
:warning::warning::warning:

공간이 제한되어 더 많은 공간을 확보할 수 없는 환경이라면 다음을 시도해 볼 수 있습니다:

./launcher stop app #(또는 해당 환경에 따라 web_only와 data 둘 다)
mkdir -p /var/discourse/shared/standalone/postgres_data_new
docker run --rm \
	--entrypoint=/bin/bash \
	-v /var/discourse/shared/standalone/postgres_data:/var/lib/postgresql/13/data \
	-v /var/discourse/shared/standalone/postgres_data_new:/var/lib/postgresql/15/data \
	tianon/postgres-upgrade:13-to-15 \
	-c "apt-get update && apt-get install -y postgresql-13-pgvector postgresql-15-pgvector &&
	docker-upgrade"
mv /var/discourse/shared/standalone/postgres_data /var/discourse/shared/standalone/postgres_data_old
mv /var/discourse/shared/standalone/postgres_data_new /var/discourse/shared/standalone/postgres_data
docker run --rm -v /var/discourse/shared/standalone:/shared local_discourse/app \
	chown -R postgres:postgres /shared/postgres_data #(또는 local_discourse/data)
./launcher rebuild app #(또는 해당 환경에 따라 먼저 data, 그 다음 web_only)

테스트 결과 이 절차는 현재 데이터베이스 크기의 1배 미만의 여유 공간이 필요합니다.

기본 로케일이 아닌 것을 사용하는 경우, 첫 번째 docker 명령을 다음과 같이 교체하여 시도해 볼 수 있습니다:

# 'en_US.UTF-8'을 사용자 로케일로 변경
 docker run --rm \
	--entrypoint=/bin/bash \
	-e LANG='en_US.UTF-8' \
	-v /var/discourse/shared/standalone/postgres_data:/var/lib/postgresql/13/data \
	-v /var/discourse/shared/standalone/postgres_data_new:/var/lib/postgresql/15/data \
	tianon/postgres-upgrade:13-to-15 \
	-c 'sed -i "s/^# $LANG/$LANG/" /etc/locale.gen && locale-gen &&
	apt-get update && apt-get install -y postgresql-13-pgvector postgresql-15-pgvector &&
	docker-upgrade'

업데이트 보류

다음 재빌드 시 업데이트를 보류해야 하는 경우, app.yml 파일에서 "templates/postgres.template.yml""templates/postgres.13.template.yml"로 변경하여 PostgreSQL 템플릿을 교체할 수 있습니다.

이것은 권장되지 않습니다. 일부 사이트 관리자가 나중에 변경 사항을 되돌리는 것을 잊어버리기 때문입니다.

업데이트 후 선택적 작업

PostgreSQL 통계 최적화

업데이트 후, 새 PostgreSQL에는 테이블 통계가 없습니다. 다음을 사용하여 생성할 수 있습니다:

docker exec -u postgres app \
	/usr/lib/postgresql/15/bin/vacuumdb -d discourse --analyze-in-stages

오래된 데이터 정리

표준 설치의 경우, 다음 명령을 사용하여 PG13 형식의 오래된 데이터를 삭제할 수 있습니다:

cd /var/discourse
./launcher cleanup

별도의 데이터 컨테이너가 있는 경우, 백업 사본을 다음과 같이 제거해야 합니다:

rm -fr /var/discourse/shared/data/postgres_data_old/

FAQ

소스 클러스터가 깨끗하게 종료되지 않았습니다

위와 같은 메시지와 함께 업그레이드 실패가 발생하면, 더 나은 상태로 복원하기 위해 더 간단한 접근 방식을 시도해 볼 수 있습니다.

./launcher start app를 사용하여旧的 컨테이너를 다시 시작합니다. 다시 시작될 때까지 몇 분 정도 기다립니다.

이제 ./launcher stop app를 사용하여 다시 종료합니다. 그런 다음 로그를 tail하여 깨끗하게 종료되었는지 확인합니다:

tail -f shared/standalone/log/var-log/postgres/current
2025-01-24 09:19:06.437 UTC [37] LOG:  received smart shutdown request
2025-01-24 09:19:06.444 UTC [37] LOG:  background worker "logical replication launcher" (PID 54) exited with exit code 1
2025-01-24 09:19:06.446 UTC [49] LOG:  shutting down
2025-01-24 09:19:06.468 UTC [37] LOG:  database system is shut down

로그에 데이터베이스가 종료되었음을 나타내지 않는 경우,旧的 컨테이너를 다시 시작하고 ./launcher enter app로 진입하여 이 명령들을 실행한 후 완료되면 다시 로그를 tail합니다.

export SVWAIT=300
sv stop nginx
sv stop unicorn
sv stop postgres
exit

로그가 위와 같으면 이제 ./launcher rebuild app를 사용하여 다시 업그레이드를 시도할 수 있습니다.

데이터베이스 "postgres"의 lc_collate 값이 일치하지 않습니다

이 오류는 데이터베이스에 기본 로케이가 아닌 것을 사용하는 경우 발생합니다. 성공하려면 3개의 변수가 필요하다고 보고되었습니다. app.yml 파일의 env: 섹션에 다음 3줄이 있는지 확인하십시오:

  LC_ALL: en_US.UTF-8
  LANG: en_US.UTF-8
  LANGUAGE: en_US.UTF-8

en_US.UTF-8을 사용자 로케일로 변경합니다.

모든 재빌드 시 업그레이드가 다시 실행됨 (업그레이드 루프)

이것이 발생하면 업그레이드 로그에 다음이 포함됩니다.

mv: cannot move '/shared/postgres_data' to '/shared/postgres_data_old/postgres_data': Directory not empty
mv: cannot move '/shared/postgres_data_new' to '/shared/postgres_data/postgres_data_new': Directory not empty

이는 이전 업그레이드에서 남은 파일이 여전히 존재한다는 것을 의미합니다. 계속하기 전에 이를 다른 곳으로 이동하십시오.

업그레이드 완료 제안 스크립트 - 무언가 해야 하나요?

업그레이드가 완료되면 pg_upgrade 메시지 출력에서 다음을 볼 수 있습니다:

Upgrade Complete
----------------
Optimizer statistics are not transferred by pg_upgrade.
Once you start the new server, consider running:
    /usr/lib/postgresql/15/bin/vacuumdb --all --analyze-in-stages

Running this script will delete the old cluster's data files:
    ./delete_old_cluster.sh

이 메시지는 안전하게 무시할 수 있습니다.

PostgreSQL 13 업데이트를 건너뛴 경우, 이제 어떻게 해야 하나요?

이 가이드 상단의 표준 지침을 따르면 문제없이 현재 버전에서 15로 업그레이드됩니다.

공간이 제한된 지침을 따르는 경우, 버전 번호를 적절히 조정하십시오.

인덱스를 다시 빌드하면 상당한 디스크 공간 절약이 가능합니다. 업그레이드 후 PostgreSQL 13 업데이트의 단계를 따르십시오.

28개의 좋아요
Cannot rebuild app because UPGRADE OF POSTGRES FAILED
Site offline after rebuild (4th Feb 2025)
Launcher upgrade failing
Specifically for 3.4.0.beta4 -- what are the system requirements?
Update “3.4.0.beta4” failed
Admin dashboard not working after docker update
Site not working after upgrade
Discourse rebuild fails due to unclean shutdown
Move from standalone container to separate web and data containers
Not receiving notifications for some replies
Hundreds of megabytes of apparently duplicate locale .js files
Upgrade failed spectacularily
Quote Callouts
502 Bad Gateway after updating to latest version
Failing update
Backup Failed error
Failing update
Let's Encrypt SSL certificates not renewing
Failing update
Long runtime moving posts / timeout errors
Make (temporary) use of Network Storage for Restores, PSQL Update,
Error updating from 3.3 to 3.5
Unable to rebuild app / upgrade to 3.4.0.beta4
Upgrade fail unsupported Docker Version
Endlessly running Postgres processes & bad performance after Reinstall/restore
Unable to upgrade to PostgreSQL 15/
PostgreSQL update fails from China
Postgres doesn't seem to be running when running Discourse locally using Docker
Unable to upgrade to PostgreSQL 15/
My install is 16,359 commits behind! Advice?
Admin functions
Discourse rebuild process hangs at PostgreSQL initialization with "trust" authentication warning
Discourse update error with Terser
Getting white screen on admin page after update
Upgrade fails (again :) )
Update failure
I broke my site while updating it
Major upgrade -- best practices?
An upgrade knocked my site offline; how long until it's restored?
Upgrade failed. Database stopped. (multisite install)
Can't log into Digital Ocean--And they aren't replying. Advice?
Trouble updating discourse after some time - UPGRADE OF POSTGRES FAILED
Site Offline Since Update - pg15 upgrade failed
PostgreSQL 18 update for self-hosters
Postgres doesn't seem to be running when running Discourse locally using Docker
PostgreSQL update fails from China
Update v3.4.0.beta3 +21 to v3.4.0.beta4 +37 fails, unable to create a directory
Issue with rebuilding
Site upgrade insisting on database upgrade after manual db upgrade
Unable to upgrade Kore Community Instance
Upgrade from postgres 13 to 15 failing - currently means forum is unavailable
Cannot rebuild app,
Can publishing "from" the `#staff` category prevent emails being sent?
Site offline after rebuild (4th Feb 2025)
Site Offline Since Update - pg15 upgrade failed
Upgrade failed. Database stopped. (multisite install)
Rebuild fails: Data directory /shared/postgres_data must not be owned by root
Discourse rebuild fails due to unclean shutdown
Discourse Randomly Does Not run or Rebuild
Hundreds of megabytes of apparently duplicate locale .js files

https://community.ankihub.net/admin/update 페이지를 방문하면 다음과 같은 메시지가 표시됩니다:

현재 사용 중인 Discourse 이미지 버전이 오래되었습니다.
최신 이미지를 실행할 때까지 웹 UI를 통한 업데이트가 비활성화되어 있습니다. 이를 수행하려면 SSH를 사용하여 서버에 로그인하고 다음을 실행하십시오:

cd /var/discourse
git pull
./launcher rebuild app

위 지시사항을 따랐더니 UPGRADE OF POSTGRES FAILED 오류가 발생합니다:

invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for postgresql-common (267.pgdg120+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Stopping PostgreSQL 13 database server: main.
Stopping PostgreSQL 15 database server: main.
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for system-defined composite types in user tables  ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for user-defined encoding conversions              ok
Checking for user-defined postfix operators                 ok
Checking for incompatible polymorphic functions             ok
Creating dump of global objects                             ok
Creating dump of database schemas
*failure*

Consult the last few lines of "/shared/postgres_data_new/pg_upgrade_output.d/20250129T103738.877/log/pg_upgrade_dump_16384.log" for
the probable cause of the failure.
Failure, exiting
-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES FAILED

Please visit https://meta.discourse.org/t/postgresql-15-update/349515 for support.

You can run ./launcher start app to restart your app in the meanwhile
-------------------------------------------------------------------------------------



FAILED
--------------------
Pups::ExecError: if [ -f /root/install_postgres ]; then
  /root/install_postgres && rm -f /root/install_postgres
elif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then
  socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
fi
 failed with return #<Process::Status: pid 18 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"tag"=>"db", "cmd"=>"if [ -f /root/install_postgres ]; then\n  /root/install_postgres && rm -f /root/install_postgres\nelif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then\n  socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1\nfi\n"}
bootstrap failed with exit code 1

제가 파악한 바로는, 여기나 이 다소 관련 있는 주제에서 제 문제를 다루고 있지 않습니다.

/shared/postgres_data_new/pg_upgrade_output.d/20250129T103738.877/log/pg_upgrade_dump_16384.log의 로그는 다음과 같습니다:

command: "/usr/lib/postgresql/15/bin/pg_dump" --host /var/lib/postgresql --port 50432 --username postgres --schema-only --quote-all-identifiers --binary-upgrade --format=custom  --file="/shared/postgres_data_new/pg_upgrade_output.d/20250129T103738.877/dump/pg_upgrade_dump_16384.custom" 'dbname=discourse' >> "/shared/postgres_data_new/pg_upgrade_output.d/20250129T103738.877/log/pg_upgrade_dump_16384.log" 2>&1
pg_dump: error: query failed: ERROR:  could not access file "$libdir/vector": No such file or directory
pg_dump: detail: Query was: SELECT t.tableoid, t.oid, i.indrelid, t.relname AS indexname, pg_catalog.pg_get_indexdef(i.indexrelid) AS indexdef, i.indkey, i.indisclustered, c.contype, c.conname, c.condeferrable, c.condeferred, c.tableoid AS contableoid, c.oid AS conoid, pg_catalog.pg_get_constraintdef(c.oid, false) AS condef, (SELECT spcname FROM pg_catalog.pg_tablespace s WHERE s.oid = t.reltablespace) AS tablespace, t.reloptions AS indreloptions, i.indisreplident, inh.inhparent AS parentidx, i.indnkeyatts AS indnkeyatts, i.indnatts AS indnatts, (SELECT pg_catalog.array_agg(attnum ORDER BY attnum)   FROM pg_catalog.pg_attribute   WHERE attrelid = i.indexrelid AND     attstattarget >= 0) AS indstatcols, (SELECT pg_catalog.array_agg(attstattarget ORDER BY attnum)   FROM pg_catalog.pg_attribute   WHERE attrelid = i.indexrelid AND     attstattarget >= 0) AS indstatvals, false AS indnullsnotdistinct FROM unnest('{16805,16813,16823,16835,16846,16858,16940,16948,16963,16973,16996,17006,17029,17061,17071,17085,17095,17101,17112,17136,17151,17159,17168,17266,17280,17321,17334,17345,17354,17368,17382,17398,17412,17420,17428,17519,17532,17543,17562,17570,17620,17687,17710,17724,17738,17754,17775,17788,17803,17824,17851,17864,17898,17917,17932,17944,17958,17980,17993,18006,18019,18030,18041,18055,18069,18092,18101,18134,18145,18166,18177,18214,18241,18263,18276,18298,18324,18338,18358,18368,18403,18426,18449,18458,18470,18496,18510,18525,18534,18543,18569,18596,18607,18625,18643,18655,18663,18676,18686,18698,18710,18719,18734,18742,18757,18768,18786,18798,18802,18806,18846,18864,18879,18891,18910,18920,18932,18946,18988,19003,19014,19039,19059,19073,19085,19097,19103,19116,19140,19192,19206,19227,19250,19266,19300,19309,19328,19343,19354,19367,19389,19402,19417,19430,19497,19521,19544,19559,19569,19597,19605,19637,19687,19703,19721,19742,19771,19807,19821,19830,19839,19862,19874,19890,19904,19917,19932,19942,19951,19960,19981,20005,20021,20044,20052,20061,20073,20082,20133,20146,20157,20178,20191,20203,20217,20231,20263,20276,20297,20309,20320,28805,28951,28964,28976,28986,28997,32824,32833,32843,32852,32862,32875,32887,32899,32910,32930,32967,35131,35141,38401,38413,38437,38445,38461,38482,38495,42870,46125,46138,130133,191445,191457,191471,191486,191497,191603,191637,243875,606663,606675,606693,606707,779182,779197,779213,779225,779237,779252,779265,968985,968993,969004,969017,969027,1004239,1004251,1004263,1004276,1004295,1091838,1091849,1091860,1336877,1336884,1336891,1566392,2169846,2169852,2169858,2169864,2169870,2169876,2169882,2169888,2169894,2169900,2169906,2169912,2169918,2169924,2169930,2169936,2169942,2169948,2169954,2169960,2169966,2169972,2169978,2169984}'::pg_catalog.oid[]) AS src(tbloid)
JOIN pg_catalog.pg_index i ON (src.tbloid = i.indrelid) JOIN pg_catalog.pg_class t ON (t.oid = i.indexrelid) JOIN pg_catalog.pg_class t2 ON (t2.oid = i.indrelid) LEFT JOIN pg_catalog.pg_constraint c ON (i.indrelid = c.conrelid AND i.indexrelid = c.conindid AND c.contype IN ('p','u','x')) LEFT JOIN pg_catalog.pg_inherits inh ON (inh.inhrelid = indexrelid) WHERE (i.indisvalid OR t2.relkind = 'p') AND i.indisready ORDER BY i.indrelid, indexname
/shared/postgres_data_new/pg_upgrade_output.d/20250129T103738.877/log/pg_upgrade_dump_16384.log

./discourse-doctor의 출력 결과는 여기 있습니다:

./discourse-doctor output
DISCOURSE DOCTOR Wed 29 Jan 2025 10:39:42 AM UTC
OS: Linux forum 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux


Found containers/app.yml

==================== YML SETTINGS ====================
DISCOURSE_HOSTNAME=community.ankihub.net
SMTP_ADDRESS=smtp.mailgun.org
DEVELOPER_EMAILS=REDACTED 
SMTP_PASSWORD=REDACTED 
SMTP_PORT=587
SMTP_USER_NAME=postmaster@mg.ankihub.net
LETSENCRYPT_ACCOUNT_EMAIL=REDACTED 

==================== DOCKER INFO ====================
DOCKER VERSION: Docker version 27.2.1, build 9e34c9b

DOCKER PROCESSES (docker ps -a)

CONTAINER ID   IMAGE                           COMMAND        CREATED         STATUS          PORTS                                                                      NAMES
37e2430e1014   local_discourse/app             "/sbin/boot"   4 months ago    Up 33 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp   app
260f4c0ed417   local_discourse/mail-receiver   "/sbin/boot"   20 months ago   Up 4 months     0.0.0.0:25->25/tcp, :::25->25/tcp                                          mail-receiver


Discourse container app is running


==================== PLUGINS ====================
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-assign.git
          - git clone https://github.com/discourse/discourse-templates.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-reactions.git
          - git clone https://github.com/discourse/discourse-chat-integration.git
          - git clone https://github.com/discourse/discourse-code-review.git
          - git clone https://github.com/discourse/discourse-topic-voting.git
          - git clone https://github.com/discourse/discourse-automation.git
          - git clone https://github.com/discourse/discourse-bbcode-color.git
          - git clone https://github.com/discourse/discourse-data-explorer.git
          - git clone https://github.com/discourse/discourse-docs.git
          - git clone https://github.com/discourse/discourse-ai.git
          - git clone https://github.com/discourse/discourse-jira.git

No non-official plugins detected.

See https://github.com/discourse/discourse/blob/main/lib/plugin/metadata.rb for the official list.

========================================
Discourse version at community.ankihub.net: Discourse 3.4.0.beta2 
Discourse version at localhost: Discourse 3.4.0.beta2 


==================== MEMORY INFORMATION ====================
OS: Linux
RAM (MB): 4127

              total        used        free      shared  buff/cache   available
Mem:           3936        1567         158         274        2209        1802
Swap:          2047          67        1980

==================== DISK SPACE CHECK ====================
---------- OS Disk Space ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        78G   50G   28G  65% /

---------- Container Disk Space ----------
Filesystem      Size  Used Avail Use% Mounted on
overlay          78G   50G   28G  65% /
/dev/vda1        78G   50G   28G  65% /shared
/dev/vda1        78G   50G   28G  65% /var/log

==================== DISK INFORMATION ====================
Disk /dev/loop0: 55.68 MiB, 58363904 bytes, 113992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 91.85 MiB, 96292864 bytes, 188072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 63.71 MiB, 66789376 bytes, 130448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 63.10 MiB, 67080192 bytes, 131016 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 44.45 MiB, 46596096 bytes, 91008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 91.9 MiB, 96346112 bytes, 188176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 44.3 MiB, 46448640 bytes, 90720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/vda: 80 GiB, 85899345920 bytes, 167772160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2ED04D82-BA1D-4A75-86B9-9553B7EA5228

Device      Start       End   Sectors  Size Type
/dev/vda1  227328 167772126 167544799 79.9G Linux filesystem
/dev/vda14   2048     10239      8192    4M BIOS boot
/dev/vda15  10240    227327    217088  106M Microsoft basic data

Partition table entries are not in disk order.


Disk /dev/loop8: 55.37 MiB, 58052608 bytes, 113384 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

==================== END DISK INFORMATION ====================

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Mail test skipped.

==================== DONE! ====================

누군가 올바른 방향으로 이끌어 주셨으면 합니다. 감사합니다!

1개의 좋아요

저도 같은 문제를 겪고 있으며, 해결책을 찾고 있습니다.

1개의 좋아요

인스턴스의 데이터베이스 크기를 어떻게 확인하나요?

2개의 좋아요

리포트 감사합니다. could not access file "$libdir/vector" 문제를 조사하고 있습니다.

표준 설치 환경이라면 다음 명령을 실행할 수 있을 것 같습니다:

du -sh /var/discourse/shared/standalone/postgres_data

예를 들어 제 테스트 사이트의 경우 결과는 다음과 같습니다:

# du -sh /var/discourse/shared/standalone/postgres_data
237M	/var/discourse/shared/standalone/postgres_data

(@mwaniki 더 나은 방법이 있다면 알려주세요!)

4개의 좋아요

네, 이 명령어는 디스크에 있는 모든 PostgreSQL 데이터 파일( WAL 파일 포함)의 총 크기를 반환합니다.

discourse 데이터베이스의 크기만 알고 싶다면, pg_database_size 함수 또는 \list+ 메타 커맨드를 사용할 수 있습니다.

docker exec -u postgres app psql -c "SELECT pg_size_pretty( pg_database_size('discourse') ) AS db_size;"

# 또는

docker exec -u postgres app psql -c "\list+ discourse"
6개의 좋아요

참고로, postgres가 제안하는 명령어 대신 자사의 vacuum analyze 폼 중 하나를 사용하는 것이 어떤 이점이 있나요?

discourse 데이터베이스 이외의 항목에 대해 이러한 통계 생성이 불필요하다는 점 때문인가요? 그렇다면, 매우 큰 인스턴스의 경우 다음을 대신 사용하면 analyze-in-stages가 이점이 될까요:
/var/discourse/launcher run app "/usr/lib/postgresql/15/bin/vacuumdb -d discourse --analyze-in-stages"

안녕하세요 @aas, @NKERIFAC_CLAUD_NBAPNON! :wave:

이전 베이스 이미지에서 실행 중인 사이트의 launcher rebuild 명령을 실행했을 때 오류를 재현하지 못했습니다. discourse-ai 플러그인이 설치된 상태에서도 업그레이드가 성공적으로 완료되었습니다.

오류가 이전 데이터베이스에서 스키마를 덤프할 때 발생하는 것 같아, 문제가 수정되었을 것으로 예상되는 업데이트를 방금 배포했습니다.

동일한 단계를 따라 시도해 보시고 결과를 알려 주시면 감사하겠습니다.

cd /var/discourse
git pull
./launcher rebuild app

위 방법으로 문제가 해결되지 않는다면, 환경에 대한 더 자세한 정보를 공유해 주실 수 있을까요? 특히 아래 정보가 도움이 될 것입니다:

  • 현재 베이스 이미지 버전

    docker image inspect --format '{{ .Config.Image }}' local_discourse/app
    
  • 설치된 Discourse 플러그인

    cat containers/app.yml | \
    docker run --rm -i -a stdout -a stdin local_discourse/app \
    ruby -e "require 'yaml'; puts YAML.load(STDIN.readlines.join)['hooks']"
    
  • PostgreSQL 확장 프로그램 및 버전

    docker exec -u postgres app psql discourse -c "SELECT
      name,
      default_version,
      installed_version
    FROM
      pg_catalog.pg_available_extensions
    WHERE
      installed_version IS NOT NULL;"
    
3개의 좋아요

postgres.template.yml에서 우려되는 부분을 발견했습니다:

현재 로직은 PostgreSQL이 실제로 실행 중인지 여부와 관계없이 /shared/postgres_run/.s.PGSQL.5432 파일이 존재하면 스크립트가 즉시 종료되도록 합니다. 이로 인해 업그레이드 스크립트를 포함한 /root/install_postgres의 나머지 모든 코드가 건너뛴니다. 첫 번째 exit 0을 제거해야 한다고 생각합니다.

1개의 좋아요

저도 업그레이드가 실패합니다. 제가 확인한 오류는 로케일 문제(시스템 로케일이 항상 de_DE.UTF-8 였기 때문에 다소 이상합니다)을 가리키는 것 같습니다.

root@Ubuntu-2204-jammy-amd64-base /var/discourse # ./launcher rebuild app
x86_64 아키텍처 감지됨.
...
Launcher는 최신 상태입니다
이전 컨테이너 중지 중
+ /usr/bin/docker stop -t 600 app
app
2.0.20250129-0720: discourse/base에서 가져오는 중
Digest: sha256:01b8516e5504c0e9bc3707773015ff4407be03a89154194ff3b5b8699291bc26
Status: discourse/base:2.0.20250129-0720 이미지가 최신 상태입니다
docker.io/discourse/base:2.0.20250129-0720
/usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups.rb
/usr/local/bin/pups --stdin
/bin/bash: 경고: setlocale: LC_ALL: 로케일 변경 불가 (de_DE.UTF-8)
I, [2025-01-29T21:35:58.711630 #1]  INFO -- : stdin에서 읽는 중
I, [2025-01-29T21:35:58.721321 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown:
I, [2025-01-29T21:35:58.726551 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown:
I, [2025-01-29T21:35:58.732322 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown:
I, [2025-01-29T21:35:58.737436 #1]  INFO -- : File > /root/install_postgres  chmod: +x  chown:
I, [2025-01-29T21:35:58.742651 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown:
I, [2025-01-29T21:35:58.742825 #1]  INFO -- : /etc/postgresql/15/main/postgresql.conf에서 data_directory = '/var/lib/postgresql/15/main'를 data_directory = '/shared/postgres_data'로 대체하는 중
I, [2025-01-29T21:35:58.743394 #1]  INFO -- : /etc/postgresql/15/main/postgresql.conf에서 (?-mix:#?listen_addresses *=.*)를 listen_addresses = '*'로 대체하는 중
I, [2025-01-29T21:35:58.743708 #1]  INFO -- : /etc/postgresql/15/main/postgresql.conf에서 (?-mix:#?synchronous_commit *=.*)를 synchronous_commit = $db_synchronous_commit로 대체하는 중
I, [2025-01-29T21:35:58.744003 #1]  INFO -- : /etc/postgresql/15/main/postgresql.conf에서 (?-mix:#?shared_buffers *=.*)를 shared_buffers = $db_shared_buffers로 대체하는 중
I, [2025-01-29T21:35:58.744441 #1]  INFO -- : /etc/postgresql/15/main/postgresql.conf에서 (?-mix:#?work_mem *=.*)를 work_mem = $db_work_mem으로 대체하는 중
I, [2025-01-29T21:35:58.744734 #1]  INFO -- : /etc/postgresql/15/main/postgresql.conf에서 (?-mix:#?default_text_search_config *=.*)를 default_text_search_config = '$db_default_text_search_config'로 대체하는 중
I, [2025-01-29T21:35:58.745027 #1]  INFO -- : /etc/postgresql/15/main/postgresql.conf에서 (?-mix:#?checkpoint_segments *=.*)를 checkpoint_segments = $db_checkpoint_segments로 대체하는 중
I, [2025-01-29T21:35:58.747582 #1]  INFO -- : /etc/postgresql/15/main/postgresql.conf에서 (?-mix:#?logging_collector *=.*)를 logging_collector = $db_logging_collector로 대체하는 중
I, [2025-01-29T21:35:58.748035 #1]  INFO -- : /etc/postgresql/15/main/postgresql.conf에서 (?-mix:#?log_min_duration_statement *=.*)를 log_min_duration_statement = $db_log_min_duration_statement로 대체하는 중
I, [2025-01-29T21:35:58.748263 #1]  INFO -- : /etc/postgresql/15/main/pg_hba.conf에서 (?-mix:^#local +replication +postgres +peer$)를 local replication postgres  peer로 대체하는 중
I, [2025-01-29T21:35:58.748463 #1]  INFO -- : /etc/postgresql/15/main/pg_hba.conf에서 (?-mix:^host.*all.*all.*127.*$)를 host all all 0.0.0.0/0 md5로 대체하는 중
I, [2025-01-29T21:35:58.748657 #1]  INFO -- : /etc/postgresql/15/main/pg_hba.conf에서 (?-mix:^host.*all.*all.*::1\/128.*$)를 host all all ::/0 md5로 대체하는 중
I, [2025-01-29T21:35:58.748844 #1]  INFO -- : > if [ -f /root/install_postgres ]; then
  /root/install_postgres && rm -f /root/install_postgres
elif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then
  socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
fi

/bin/bash: 경고: setlocale: LC_ALL: 로케일 변경 불가 (de_DE.UTF-8)
initdb: 경고: 로컬 연결에 대해 "trust" 인증을 활성화합니다
initdb: 힌트: pg_hba.conf를 편집하거나 -A 옵션, 또는 --auth-local 및 --auth-host 옵션을 사용하여 다음 initdb 실행 시 이를 변경할 수 있습니다.
W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: 키가 레거시 trusted.gpg 키링(/etc/apt/trusted.gpg)에 저장되어 있습니다. 자세한 내용은 apt-key(8)의 DEPRECATION 섹션을 참조하십시오.
debconf: apt-utils가 설치되어 있지 않아 패키지 구성을 지연합니다
I, [2025-01-29T21:37:25.430685 #1]  INFO -- : 로케일 생성 중(시간이 좀 걸릴 수 있습니다)...
  de_DE.UTF-8... 완료
  en_US.UTF-8... 완료
생성 완료.
PostgreSQL을 버전 13에서 15로 업그레이드하는 중
이 데이터베이스 시스템에 속한 파일들은 "postgres" 사용자가 소유하게 됩니다.
이 사용자는 서버 프로세스도 소유해야 합니다.

데이터베이스 클러스터는 로케일 "de_DE.UTF-8"로 초기화됩니다.
기본 데이터베이스 인코딩은 이에 따라 "UTF8"으로 설정됩니다.
기본 텍스트 검색 구성은 "german"으로 설정됩니다.

데이터 페이지 체크섬은 비활성화됩니다.

기존 디렉터리 /shared/postgres_data_new의 권한 수정 ... ok
하위 디렉터리 생성 ... ok
동적 공유 메모리 구현 선택 ... posix
기본 max_connections 선택 ... 100
기본 shared_buffers 선택 ... 128MB
기본 시간대 선택 ... Etc/UTC
구성 파일 생성 ... ok
부트스트랩 스크립트 실행 ... ok
부트스트랩 후 초기화 수행 ... ok
디스크로 데이터 동기화 ... ok


성공. 이제 다음을 사용하여 데이터베이스 서버를 시작할 수 있습니다:

    /usr/lib/postgresql/15/bin/pg_ctl -D /shared/postgres_data_new -l logfile start

Get:1 http://deb.debian.org/debian bookworm-backports InRelease [59,0 kB]
Get:2 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [55,4 kB]
Get:4 https://dl.yarnpkg.com/debian stable InRelease [17,1 kB]
Get:5 http://deb.debian.org/debian-security bookworm-security InRelease [48,0 kB]
Get:6 https://deb.nodesource.com/node_22.x nodistro InRelease [12,1 kB]
Get:7 http://deb.debian.org/debian bookworm-backports/main amd64 Packages [280 kB]
Get:8 http://deb.debian.org/debian bookworm/main amd64 Packages [8.792 kB]
Get:9 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [13,5 kB]
Get:10 https://dl.yarnpkg.com/debian stable/main amd64 Packages [10,9 kB]
Get:11 https://dl.yarnpkg.com/debian stable/main all Packages [10,9 kB]
Get:12 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [243 kB]
Get:13 https://deb.nodesource.com/node_22.x nodistro/main amd64 Packages [5.274 B]
Get:14 https://apt.postgresql.org/pub/repos/apt bookworm-pgdg InRelease [129 kB]
Get:15 https://apt.postgresql.org/pub/repos/apt bookworm-pgdg/main amd64 Packages [360 kB]
Fetched 10,2 MB in 2s (6.159 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  postgresql-client-13
Suggested packages:
  postgresql-doc-13
The following NEW packages will be installed:
  postgresql-13 postgresql-13-pgvector postgresql-client-13
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 17,3 MB of archives.
After this operation, 56,7 MB of additional disk space will be used.
Get:1 https://apt.postgresql.org/pub/repos/apt bookworm-pgdg/main amd64 postgresql-client-13 amd64 13.18-1.pgdg120+1 [1.523 kB]
Get:2 https://apt.postgresql.org/pub/repos/apt bookworm-pgdg/main amd64 postgresql-13 amd64 13.18-1.pgdg120+1 [15,4 MB]
Get:3 https://apt.postgresql.org/pub/repos/apt bookworm-pgdg/main amd64 postgresql-13-pgvector amd64 0.8.0-1.pgdg120+1 [297 kB]
Fetched 17,3 MB in 1s (32,1 MB/s)
Selecting previously unselected package postgresql-client-13.
(Reading database ... 33363 files and directories currently installed.)
Preparing to unpack .../postgresql-client-13_13.18-1.pgdg120+1_amd64.deb ...
Unpacking postgresql-client-13 (13.18-1.pgdg120+1) ...
Selecting previously unselected package postgresql-13.
Preparing to unpack .../postgresql-13_13.18-1.pgdg120+1_amd64.deb ...
Unpacking postgresql-13 (13.18-1.pgdg120+1) ...
Selecting previously unselected package postgresql-13-pgvector.
Preparing to unpack .../postgresql-13-pgvector_0.8.0-1.pgdg120+1_amd64.deb ...
Unpacking postgresql-13-pgvector (0.8.0-1.pgdg120+1) ...
Setting up postgresql-client-13 (13.18-1.pgdg120+1) ...
Setting up postgresql-13 (13.18-1.pgdg120+1) ...
Creating new PostgreSQL cluster 13/main ...
/usr/lib/postgresql/13/bin/initdb -D /var/lib/postgresql/13/main --auth-local peer --auth-host md5
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/13/main ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctlcluster 13 main start

invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up postgresql-13-pgvector (0.8.0-1.pgdg120+1) ...
Processing triggers for postgresql-common (267.pgdg120+1) ...
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Stopping PostgreSQL 13 database server: main.
Stopping PostgreSQL 15 database server: main.
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for system-defined composite types in user tables  ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for user-defined encoding conversions              ok
Checking for user-defined postfix operators                 ok
Checking for incompatible polymorphic functions             ok
Creating dump of global objects                             ok
Creating dump of database schemas                           ok

lc_collate values for database "template1" do not match:  old "en_US.UTF-8", new "de_DE.UTF-8"
Failure, exiting
-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES FAILED

Please visit https://meta.discourse.org/t/postgresql-15-update/349515 for support.

You can run ./launcher start app to restart your app in the meanwhile
-------------------------------------------------------------------------------------



FAILED
--------------------
Pups::ExecError: if [ -f /root/install_postgres ]; then
  /root/install_postgres && rm -f /root/install_postgres
elif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then
  socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
fi
 failed with return #<Process::Status: pid 18 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"tag"=>"db", "cmd"=>"if [ -f /root/install_postgres ]; then\n  /root/install_postgres && rm -f /root/install_postgres\nelif [ -e /shared/postgres_run/.s.PGSQL.5432 ]; then\n  socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1\nfi\n"}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
80933ad1f9a6809c85383c9d512c34340988ab7791b3ff57a6a563fd42fc413f
1개의 좋아요

안녕하세요 @mwaniki, 사용자가 적용한 업데이트는 저에게 정상적으로 작동했습니다. 감사합니다.

2개의 좋아요

오래된 스키마를 덤프하는 동안 실패가 발생한다고 하셨는데, 현재 로케일 설정을 확인해 주시겠습니까?

docker exec -it -u postgres app bash
env
psql -c 'SELECT
  datname,
  datcollate,
  datctype
FROM
  pg_database;'

그렇습니다. 지적해 주셔서 감사합니다! OP의 절차를 업데이트했습니다. :+1:

기쁜 마음으로 들었습니다. 확인해 주셔서 감사합니다.

4개의 좋아요

4개의 게시글이 새 주제로 분리되었습니다: Problems with Discouse AI embeddings configuration

아이고, 업데이트 스크립트에 이 글에 대한 링크와 y/N 프롬프트가 함께 업데이트되었으면 좋았을 텐데. 이제 업데이트를 마쳤는데, 이 변경 사항 때문에 사이트 복구가 필요한지 모르겠어요.

수정: 성공적으로 완료된 것 같습니다 :tada:

포럼 중 하나를 업그레이드하는 데 성공했습니다(이 서버에는 포럼이 4개 있습니다). 다음 포럼을 업그레이드하려고 했더니 다음 오류가 발생합니다:

Caused by:
PG::ConnectionBad: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused (PG::ConnectionBad)

./launcher start app을 실행해야 서비스를 다시 올릴 수 있었습니다.

PostgreSQL 12 update 에서 PostgreSQL 12 업데이트와 관련된 문제가 있었던 것 같은 기억이 나며, 업그레이드를 시도하기 전에 다른 앱들에 대해 ./launcher stop app을 실행해야 했던 것 같습니다. 하지만 이번에는 그 방법이 통하지 않습니다. (해당 스레드의 게시글들이 자동으로 삭제되었는데, 관리자가 제가 했던 작업이 맞는지 게시글을 확인해 주실 수 있을까요?)

다른 의견이 있으신가요?

1개의 좋아요

discourse-ai 팀에 답변을 요청했습니다.

네, 정확히 그렇게 게시하신 내용입니다. 비슷한 환경으로 테스트를 해본 후 다시 알려드리겠습니다.

3개의 좋아요

Mwaniki 씨, 감사합니다. 해결했어요 - 업그레이드 rebuilds를 수행하기 전에 앱을 입력하고 sudo service postgresql stop을 실행하기만 하면 됐어요.

도와주셔서 감사합니다 :heart:

1개의 좋아요

환경에는 예상대로 로케일이 설정되어 있는 것 같습니다(아래는 env 출력 결과이며, 이메일 설정은 비공개 처리되었습니다):

LEFTHOOK=0
HOSTNAME=Ubuntu-2204-jammy-amd64-base-app
LANGUAGE=de_DE.UTF-8
UNICORN_WORKERS=8
DISCOURSE_HOSTNAME=[..]
RUBY_GC_HEAP_INIT_SLOTS=400000
DISCOURSE_SMTP_USER_NAME=[...]
DOCKER_HOST_IP=172.17.0.1
DISCOURSE_SMTP_ADDRESS=[...]
RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5
RUBY_VERSION=3.3.6
PWD=/
DISCOURSE_DB_SOCKET=/var/run/postgresql
DISCOURSE_DEVELOPER_EMAILS=[...]
HOME=/var/lib/postgresql
LANG=de_DE.UTF-8
DISCOURSE_SMTP_PORT=587
RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000
DEBIAN_RELEASE=bookworm
DISCOURSE_SMTP_PASSWORD=[...]
DISCOURSE_NOTIFICATION_EMAIL=[...]
PG_MAJOR=13
DISCOURSE_DB_HOST=
TERM=xterm
RUBY_ALLOCATOR=/usr/lib/libjemalloc.so
SHLVL=1
DISCOURSE_DB_PORT=
DISCOURSE_SMTP_DOMAIN=[...]
UNICORN_SIDEKIQS=1
LC_ALL=de_DE.UTF-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RAILS_ENV=production
_=/usr/bin/env

그러나 Postgres-Statement의 출력 결과는 미국 로케일을 나타내고 있습니다:

  datname  | datcollate  |  datctype
-----------+-------------+-------------
 postgres  | en_US.UTF-8 | en_US.UTF-8
 template1 | en_US.UTF-8 | en_US.UTF-8
 template0 | en_US.UTF-8 | en_US.UTF-8
 discourse | en_US.UTF-8 | en_US.UTF-8
(4 rows)
1개의 좋아요

해당 Discourse 인스턴스는 언제 생성하셨나요?

현재까지 문제를 재현하기 위한 시도는 하나의 로케일에서 데이터베이스를 생성한 후, 다른 로케일을 사용하여 마이그레이션을 시도할 때만 가능합니다. 해당 시기에 로케일 관련 과거 버그가 있었을 수 있는지 확인하기 위해 인스턴스가 언제 생성되었는지 이해하고 싶습니다.

2개의 좋아요

추적해 볼 수 있는 한, 초기 설치 날짜는 2024년 2월 7일이었습니다. (서버는 며칠 전에 가동된 것으로 생각되지만, 운영체제는 Ubuntu 22.04로, Discourse와 마찬가지로 지속적으로 업데이트되었습니다.)

수정:
도움이 될지 확신은 없으나, 로케일 문제와 관련된 경고가 표시되는 것은 비교적 최근 일어난 일이라고 생각합니다. 마지막으로 컨테이너를 재빌드했을 때 그 경고들을 본 기억이 나지만, 처음부터 있었던 것은 아닌 것 같습니다.

1개의 좋아요