Re: postgres and initdb not working inside docker

2022-05-28 Thread Feike Steenbergen
On Sat, May 28, 2022, 18:35 Roffild wrote: > But the volume mount has a limitation with chmod 755. I don't want to > write the database directly to the container. Using a $PGDATA subdirectory in a mounted Volume allows you to run with 0700 and also retain this limitation you mention. I don't bel

Re: postgres and initdb not working inside docker

2022-05-28 Thread David G. Johnston
On Sat, May 28, 2022 at 9:35 AM Roffild wrote: > Docker is now the DevOps standard. It's easier to build an image for > Docker and run the site with one command. > > But the volume mount has a limitation with chmod 755. I don't want to > write the database directly to the container. > > The conta

Re: postgres and initdb not working inside docker

2022-05-28 Thread Roffild
Docker is now the DevOps standard. It's easier to build an image for Docker and run the site with one command. But the volume mount has a limitation with chmod 755. I don't want to write the database directly to the container. The container is isolated from everything. Therefore, checking the

Re: postgres and initdb not working inside docker

2022-05-28 Thread Daniel Gustafsson
> On 28 May 2022, at 17:49, Tom Lane wrote: > > Daniel Gustafsson writes: >>> On 28 May 2022, at 14:59, Roffild wrote: >>> This patch fixes an issue inside Docker and will not affect other builds. > >> Looks like you generated the patch backwards, it's removing the lines you >> propose to add.

Re: postgres and initdb not working inside docker

2022-05-28 Thread Tom Lane
Daniel Gustafsson writes: >> On 28 May 2022, at 14:59, Roffild wrote: >> This patch fixes an issue inside Docker and will not affect other builds. > Looks like you generated the patch backwards, it's removing the lines you > propose to add. Lacks documentation, too. But it doesn't matter, beca

Re: postgres and initdb not working inside docker

2022-05-28 Thread Roffild
Fix Looks like you generated the patch backwards, it's removing the lines you propose to add.diff --git a/configure.ac b/configure.ac index d093fb88dd..3f0077696b 100644 --- a/configure.ac +++ b/configure.ac @@ -749,6 +749,14 @@ PGAC_ARG_BOOL(enable, cassert, no, [enable assertion checks (for d

Re: postgres and initdb not working inside docker

2022-05-28 Thread Daniel Gustafsson
> On 28 May 2022, at 14:59, Roffild wrote: > This patch fixes an issue inside Docker and will not affect other builds. Looks like you generated the patch backwards, it's removing the lines you propose to add. -- Daniel Gustafsson https://vmware.com/

Re: postgres and initdb not working inside docker

2022-05-28 Thread Roffild
Add --disable-check-permissions to ./configure After applying the patch, run "autoheader -f ; autoconf" This patch fixes an issue inside Docker and will not affect other builds.diff --git a/configure.ac b/configure.ac index 3f0077696b..d093fb88dd 100644 --- a/configure.ac +++ b/configure.ac @@ -

Re: postgres and initdb not working inside docker

2022-05-27 Thread Roffild
ild writes: postgres and initdb not working inside docker. chmod 755 always for a mounted volume inside docker. This patch will never be accepted. You don't need it if you take the standard advice[1] that the Postgres data directory should not itself be a mount point. Instead, make a subdirect

Re: postgres and initdb not working inside docker

2022-05-26 Thread Tom Lane
Roffild writes: > postgres and initdb not working inside docker. > chmod 755 always for a mounted volume inside docker. This patch will never be accepted. You don't need it if you take the standard advice[1] that the Postgres data directory should not itself be a mount point. Inst

postgres and initdb not working inside docker

2022-05-26 Thread Roffild
postgres and initdb not working inside docker. chmod 755 always for a mounted volume inside docker. = From: Roffild 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