مشكلة في تحديث discourse بعد فترة - فشل ترقية POSTGRES

لم أقم بترقية Discourse منذ فترة طويلة وحاولت القيام بذلك اليوم. في متصفحي على admin/update تظهر لي رسالة تفيد بأن كل شيء محدث، ولكنه يعرض الإصدار v2.4.0.beta2 +17 وأفهم أن أحدث إصدار هو 3.6.0.beta2.

لذا حاولت التحديث عبر الطرفية باستخدام ./launcher rebuild app وفشل التحديث، مع ظهور الرسالة UPGRADE OF POSTGRES FAILED (فشل ترقية POSTGRES). قرأت صفحة الدعم وتابعت جميع التعليمات الواردة فيها وفي المنشورات المماثلة حول مشاكل تحديث POSTGRES، لكنني لم أتمكن من حل المشكلة.

لقد اطلعت على السجلات في /var/discourse/shared/standalone/log/var-log/postgres ووجدت رسائل خطأ متكررة، مثل هذه:

2025-11-19 21:42:13.815 GMT [242] LOG: skipping missing configuration file “/shared/postgres_data/postgresql.auto.conf”
2025-11-19 21:42:13.816 UTC [242] FATAL: data directory “/shared/postgres_data” has wrong ownership
2025-11-19 21:42:13.816 UTC [242] HINT: The server must be started by the user that owns the data directory.

شيء واحد لا أفهمه هو أنه لا يوجد دليل /shared/postgres_data - بل يوجد /shared/standalone/postgres_data.

رسالة الخطأ من الطرفية مدرجة أدناه. سأكون ممتنًا لأي إشارات للمساعدة في جعل التحديث يعمل.

شكرًا،

نيك


Success. You can now start the database server using:



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



Ign:1 
 buster-pgdg InRelease

Ign:2 
 buster/updates InRelease

Err:3 
 buster-pgdg Release

  404  Not Found [IP: 151.101.67.52 80]

Err:4 
 buster/updates Release

  404  Not Found [IP: 151.101.2.132 80]

Ign:5 
 buster InRelease

Ign:6 
 buster-updates InRelease

Err:7 
 buster Release

  404  Not Found [IP: 151.101.2.132 80]

Err:8 
 buster-updates Release

  404  Not Found [IP: 151.101.2.132 80]

Get:9 https://deb.nodesource.com/node_15.x buster InRelease [4,584 B]

Reading package lists...

Reading package lists...

Building dependency tree...

Reading state information...

The following additional packages will be installed:

  postgresql-client-10

Suggested packages:

  postgresql-doc-10

The following NEW packages will be installed:

  postgresql-10 postgresql-client-10

0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.

Need to get 6,441 kB of archives.

After this operation, 30.6 MB of additional disk space will be used.

Err:1 
 buster-pgdg/main amd64 postgresql-client-10 amd64 10.17-1.pgdg100+1

  404  Not Found [IP: 151.101.195.52 80]

Err:2 
 buster-pgdg/main amd64 postgresql-10 amd64 10.17-1.pgdg100+1

  404  Not Found [IP: 151.101.195.52 80]

Stopping PostgreSQL 13 database server: main.



check for "/usr/lib/postgresql/10/bin" failed: No such file or directory



Failure, exiting

-------------------------------------------------------------------------------------

UPGRADE OF POSTGRES FAILED

Please visit 
 for support.

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

FAILED

--------------------

Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 50 exit 1>

Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'

exec failed with the params "/root/upgrade_postgres"

9f400ba2cca88f79359496e95027cf26c2d5a3672837c5594793cf723585407b

** 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.