initdb failing: Invalid binary "/usr/bin/postgres"?

Lists: pgsql-cygwin
From: "Davide Bruzzone" <dbruzzone(at)attbi(dot)com>
To: <pgsql-cygwin(at)postgresql(dot)org>
Subject: initdb failing: Invalid binary "/usr/bin/postgres"?
Date: 2002-07-07 17:53:00
Message-ID: 000001c225df$22cead20$6601a8c0@minime
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Greetings all...

I'm in the process of setting up Cygwin/PostgreSQL (7.2.1-2) on a
Windows XP Professional machine, and am having trouble running initdb.
Here's what's happening (Note: I'm logged in as the postgres user when
I execute the following command. Also, ipc-daemon is running, and was
started with "ipc-daemon&"):

$ initdb -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user
"postgres".
This user must also own the server process.

Fixing permissions on existing directory /usr/share/postgresql/data...
ok
creating directory /usr/share/postgresql/data/base... ok
creating directory /usr/share/postgresql/data/global... ok
creating directory /usr/share/postgresql/data/pg_xlog... ok
creating directory /usr/share/postgresql/data/pg_clog... ok
creating template1 database in /usr/share/postgresql/data/base/1... ok
creating configuration files... ok
initializing pg_shadow... FindExec: invalid binary "/usr/bin/postgres"
FATAL 1: /usr/bin/postgres: could not locate executable, bailing
out...

initdb failed.

If I go and look in /usr/bin, I find postgres.exe, and postmaster
(Which is a symlink to postgres.exe).

Has anyone seen this before? Can anyone point me in the direction of
some information regarding this problem?

Any help would be greatly appreciated...

Cheers...

Dave Bruzzone


From: Jason Tishler <jason(at)tishler(dot)net>
To: Davide Bruzzone <dbruzzone(at)attbi(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: initdb failing: Invalid binary "/usr/bin/postgres"?
Date: 2002-07-08 17:01:26
Message-ID: 20020708170125.GA792@tishler.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Dave,

On Sun, Jul 07, 2002 at 11:53:00AM -0600, Davide Bruzzone wrote:
> $ initdb -D /usr/share/postgresql/data
> [snip]
> initializing pg_shadow... FindExec: invalid binary "/usr/bin/postgres"
> FATAL 1: /usr/bin/postgres: could not locate executable, bailing out...

I was able to reproduce the above problem by doing the following:

$ chmod g-x,o-x /usr/bin/postgres.exe

> If I go and look in /usr/bin, I find postgres.exe, and postmaster
> (Which is a symlink to postgres.exe).

What is the output of the following?

$ ls -l /usr/bin/postgres.exe
-rwxrw-rw- 1 Administ Domain U 2708992 Jun 10 08:13 /usr/bin/postgres.exe
^ ^
* *

If it is the same as or similar to the above (i.e., missing group and/or
other execute permissions), then do the following to fix your
permissions:

$ chmod +x /usr/bin/postgres.exe

Does this solve your problem?

> Has anyone seen this before?

No.

> Can anyone point me in the direction of some information regarding
> this problem?

See above

But, the really question is why did your permissions get whacked if my
WAG is correct?

Jason


From: "Jim George" <jim(dot)george(at)blueyonder(dot)co(dot)uk>
To: "Davide Bruzzone" <dbruzzone(at)attbi(dot)com>, <pgsql-cygwin(at)postgresql(dot)org>
Subject: Re: initdb failing: Invalid binary "/usr/bin/postgres"?
Date: 2002-07-08 22:17:35
Message-ID: 008201c226cd$44ce09e0$0400a8c0@JIMGEORGE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

Have you checked the permission of /usr/bin and postgres.exe? Are both R-X
at least for the postgres user?

Jim

----- Original Message -----
From: "Davide Bruzzone" <dbruzzone(at)attbi(dot)com>
To: <pgsql-cygwin(at)postgresql(dot)org>
Sent: Sunday, July 07, 2002 6:53 PM
Subject: [CYGWIN] initdb failing: Invalid binary "/usr/bin/postgres"?

> Greetings all...
>
> I'm in the process of setting up Cygwin/PostgreSQL (7.2.1-2) on a
> Windows XP Professional machine, and am having trouble running initdb.
> Here's what's happening (Note: I'm logged in as the postgres user when
> I execute the following command. Also, ipc-daemon is running, and was
> started with "ipc-daemon&"):
>
> $ initdb -D /usr/share/postgresql/data
> The files belonging to this database system will be owned by user
> "postgres".
> This user must also own the server process.
>
> Fixing permissions on existing directory /usr/share/postgresql/data...
> ok
> creating directory /usr/share/postgresql/data/base... ok
> creating directory /usr/share/postgresql/data/global... ok
> creating directory /usr/share/postgresql/data/pg_xlog... ok
> creating directory /usr/share/postgresql/data/pg_clog... ok
> creating template1 database in /usr/share/postgresql/data/base/1... ok
> creating configuration files... ok
> initializing pg_shadow... FindExec: invalid binary "/usr/bin/postgres"
> FATAL 1: /usr/bin/postgres: could not locate executable, bailing
> out...
>
> initdb failed.
>
> If I go and look in /usr/bin, I find postgres.exe, and postmaster
> (Which is a symlink to postgres.exe).
>
> Has anyone seen this before? Can anyone point me in the direction of
> some information regarding this problem?
>
> Any help would be greatly appreciated...
>
> Cheers...
>
> Dave Bruzzone
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
>