postgres and initdb not working inside docker

From: Roffild <roffild(at)hotmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: postgres and initdb not working inside docker
Date: 2022-05-26 09:22:35
Message-ID: DB9P193MB1177950F922F4530CB2ABD29B3D99@DB9P193MB1177.EURP193.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

postgres and initdb not working inside docker.

chmod 755 always for a mounted volume inside docker.

=============

From: Roffild <roffild(at)hotmail(dot)com>
Subject: fix chmod inside docker

diff --git a/src/backend/utils/init/miscinit.c
b/src/backend/utils/init/miscinit.c
index 30f0f19dd5..adf3218cf9 100644
--- a/src/backend/utils/init/miscinit.c
+++ b/src/backend/utils/init/miscinit.c
@@ -373,7 +373,7 @@ checkDataDir(void)
      */
 #if !defined(WIN32) && !defined(__CYGWIN__)
     if (stat_buf.st_mode & PG_MODE_MASK_GROUP)
-        ereport(FATAL,
+        ereport(WARNING,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
                  errmsg("data directory \"%s\" has invalid permissions",
                         DataDir),

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-05-26 11:10:22 Re: Handle infinite recursion in logical replication setup
Previous Message Aleksander Alekseev 2022-05-26 08:47:13 Re: [RFC] building postgres with meson