docker-gitlab icon indicating copy to clipboard operation
docker-gitlab copied to clipboard

A bug that is related to the version of PostgreSQL

Open lyenliang opened this issue 11 months ago • 5 comments

Hi, I'm using the docker-comse.yml file of version15.11.5 to run a gitlab server on my computer.

I encountered the this bug on my gitlab server recently.

FATAL: the database system is in recovery mode 
LOG: server process (PID 10611) was terminated by signal 11: Segmentation fault 
DETAIL: Failed process was running: /*application:sidekiq,correlation_id:<ID>,jid:<JID>,endpoint_id:LooseForeignKeys::CleanupWorker,db_config_name:main*/ DELETE FROM "ci_pipelines" WHERE ("ci_pipelines"."id") IN (SELECT "ci_pipelines"."id" FROM "ci_pipelines" WHERE "ci_pipelines"."merge_request_id" IN (12345, 12346) LIMIT 1000 FOR UPDATE SKIP LOCKED) 
LOG: terminating any other active server processes 
WARNING: terminating connection because of crash of another server process 
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 
LOG: all server processes terminated; reinitializing 
LOG: database system was interrupted; last known up at <TIME>
LOG: database system was not properly shut down; automatic recovery in progress 

The article says that in order to fix this bug, we have to upgrade PostgreSQL to 12.7 or 13.3.

The fix is to upgrade to the latest patch level of PostgreSQL - minimum 12.7 or 13.3, but to avoid any other known bugs, select the latest patch level of your current major release (12.x or 13.x)

Can you upgrade the version of sameersbn/postgresql docker image in docker-compose.yml? The latest version of sameersbn/postgresql:12-20200524 is psql (PostgreSQL) 12.3 (Ubuntu 12.3-1.pgdg18.04+1), which is older than 12.7.

lyenliang avatar Jul 19 '23 03:07 lyenliang

I have also been seeing the warning in the admin page

Database 'ci' is using PostgreSQL 12.3, but this version of GitLab requires PostgreSQL 13. Please upgrade your environment to a supported PostgreSQL version. See database requirements for details.

gitlab-16-1-warning-admin-page

I hope the database can be updated soon 👌

nehemiascr avatar Jul 19 '23 10:07 nehemiascr

Anyone know what the tentative date is for upgrading the postgres database to 15+? The docker compose file still uses postgres 12. My instance is just peg-legging along.

ghost avatar Jul 20 '23 17:07 ghost

Hi,

Use sameersbn/postgresql:latest in your docker-comppose.yml file. Be sure to have a backup of the database in case you need to restore it.

alexbog8 avatar Jul 21 '23 06:07 alexbog8

Related #2771 #2572

victorelec14 avatar Jul 21 '23 10:07 victorelec14

Why not use the official version of PostgreSQL 13

peterwillcn avatar Jul 23 '23 12:07 peterwillcn