Re: initdb fails to initialize data directory

2018-04-19 Thread Michael Paquier
On Thu, Apr 19, 2018 at 04:59:44PM -0300, Alvaro Herrera wrote: > Heikki Linnakangas wrote: >> Nitpick: using MAXPGPATH seems for the buffer size seems to wrong to me. >> We're not storing a path here. MAXPGPATH is 1024 by default, which seems >> fine, but I would've spelled it out directly as "lin

Re: initdb fails to initialize data directory

2018-04-19 Thread Alvaro Herrera
Heikki Linnakangas wrote: > Nitpick: using MAXPGPATH seems for the buffer size seems to wrong to me. > We're not storing a path here. MAXPGPATH is 1024 by default, which seems > fine, but I would've spelled it out directly as "line[1000]". Hmm ... yeah, kinda. Do you care about it strongly enoug

Re: initdb fails to initialize data directory

2018-04-19 Thread Heikki Linnakangas
On 19/04/18 09:38, Alvaro Herrera wrote: Nikhil Sontakke wrote: Intrigued, on digging down further, this is happening because we are not using a long enough buffer to accept the output of "postgres -V" in the find_other_exec() function. In our case, we had used --with-extra-version option with

Re: initdb fails to initialize data directory

2018-04-19 Thread Alvaro Herrera
Nikhil Sontakke wrote: > Intrigued, on digging down further, this is happening because we are > not using a long enough buffer to accept the output of "postgres -V" > in the find_other_exec() function. In our case, we had used > --with-extra-version option with configure which caused the output of

initdb fails to initialize data directory

2018-04-19 Thread Nikhil Sontakke
Hi, Encountered the following behavior with initdb on one of our test builds while using latest master head: initdb -D $DATADIR The program "postgres" was found by "/Users/nikhils/install/bin/initdb" but was not the same version as initdb. Check your installation. Intrigued, on digging down fur