Re: heads up -- subtle change of behavior of new initdb - Mailing list pgsql-hackers

From Joe Conway
Subject Re: heads up -- subtle change of behavior of new initdb
Date
Msg-id 3FB479EA.4050604@joeconway.com
Whole thread Raw
In response to Re: heads up -- subtle change of behavior of new initdb  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
>>Now, that second step is not needed, but as of today it produces an
>>installation that won't start due to improper permissions on data
>
> That's a bug --- evidently the "fix permissions" path of control is
> wrong; can you take a look?

Here's a small patch. I think this is all that's needed.

Joe
Index: src/bin/initdb/initdb.c
===================================================================
RCS file: /opt/src/cvs/pgsql-server/src/bin/initdb/initdb.c,v
retrieving revision 1.7
diff -c -r1.7 initdb.c
*** src/bin/initdb/initdb.c    13 Nov 2003 23:46:31 -0000    1.7
--- src/bin/initdb/initdb.c    14 Nov 2003 07:46:22 -0000
***************
*** 2345,2350 ****
--- 2345,2353 ----

          made_new_pgdata = true;
      }
+     else
+         /* already exists, but make sure permissions are correct */
+         chmod(pg_data, 0700);

      /* Create required subdirectories */


pgsql-hackers by date:

Previous
From: Shridhar Daithankar
Date:
Subject: Re: Background writer process
Next
From: Andrew Dunstan
Date:
Subject: Re: heads up -- subtle change of behavior of new initdb