Thread: Problem in Pg 8.1.4 with CREATEDB

Problem in Pg 8.1.4 with CREATEDB

From
Pit Müller
Date:
Hello !
We have a very sophisticated setup for our software which needs to
install databases on a PostgreSQL Server if the user chooses PG as
database system. This setup worked fine on 8.1 to 8.1.3 but fails now
with 8.1.4. It looks like the problem is caused by CREATEDB, which seems
to hang.
Does anyone know this problem ?

Regards,

Pit

Re: Problem in Pg 8.1.4 with CREATEDB

From
Bruce Momjian
Date:
Pit M�ller wrote:
> Hello !
> We have a very sophisticated setup for our software which needs to
> install databases on a PostgreSQL Server if the user chooses PG as
> database system. This setup worked fine on 8.1 to 8.1.3 but fails now
> with 8.1.4. It looks like the problem is caused by CREATEDB, which seems
> to hang.
> Does anyone know this problem ?

Is this Win32?  Is it perhaps prompting for a password from the
terminal, but you used to pipe in the password.  That changed in 8.1.4
on Win32.

--
  Bruce Momjian   http://candle.pha.pa.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: Problem in Pg 8.1.4 with CREATEDB

From
Pit Müller
Date:
Bruce Momjian wrote:
> Pit M�ller wrote:
>
>> Hello !
>> We have a very sophisticated setup for our software which needs to
>> install databases on a PostgreSQL Server if the user chooses PG as
>> database system. This setup worked fine on 8.1 to 8.1.3 but fails now
>> with 8.1.4. It looks like the problem is caused by CREATEDB, which seems
>> to hang.
>> Does anyone know this problem ?
>>
>
> Is this Win32?  Is it perhaps prompting for a password from the
> terminal, but you used to pipe in the password.  That changed in 8.1.4
> on Win32.
>
>
Yes, thats absolutely right.
How can we set the password for CREATEDB now, ? Any suggestions ?
I think in V8.0 there was a simple command line parameter for the
password, but that changed in V 8.1.
Why have they changed such an important behaviour between two service
packs ?

Pit

Re: Problem in Pg 8.1.4 with CREATEDB

From
Alexander Scholz
Date:
Yes, we have the same problem!  Refer to the thread with the subject
"Problem V8.1.4 - providing pwd for commandline tools doesn't work anymore".

They seem to have change the old behaviour of the commandline tools,
which worked well since 8.0! I don't understand why the change should be
"more secure", but I see that nobody took care about the possible
consequences for installation scripts, third party applications and so
on. :-(((

At least they should have clearly stated this in the update readme. (The
comment "Fix problem with password prompting on some Win32 systems" just
says nothing at all, which could have "alerted" anybody that might
concern the effect of it)

Sigh,

Alexander.

on 31.05.2006 09:12 Pit Müller wrote:
> Hello !
> We have a very sophisticated setup for our software which needs to
> install databases on a PostgreSQL Server if the user chooses PG as
> database system. This setup worked fine on 8.1 to 8.1.3 but fails now
> with 8.1.4. It looks like the problem is caused by CREATEDB, which seems
> to hang.
> Does anyone know this problem ?
>
> Regards,
>
> Pit
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match
>

Re: Problem in Pg 8.1.4 with CREATEDB

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of
> Alexander Scholz
> Sent: 31 May 2006 09:56
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Problem in Pg 8.1.4 with CREATEDB
>
> Yes, we have the same problem!  Refer to the thread with the subject
> "Problem V8.1.4 - providing pwd for commandline tools doesn't
> work anymore".
>
> They seem to have change the old behaviour of the commandline tools,
> which worked well since 8.0! I don't understand why the
> change should be
> "more secure", but I see that nobody took care about the possible
> consequences for installation scripts, third party applications and so
> on. :-(((
>
> At least they should have clearly stated this in the update
> readme. (The
> comment "Fix problem with password prompting on some Win32
> systems" just
> says nothing at all, which could have "alerted" anybody that might
> concern the effect of it)

The reason was that the way it was broken, a number of people had been
completely unable to use psql/pg_dump etc because in certain situations
it would (mistakenly) attempt to read the their password from a file and
not their command prompt window.

I don't think anyone ever imagined that the bug actually allowed people
to use utilities in a way that was useful to them, but unintended by
everyone else. Had we done, we would certainly have made the warnings
more obvious and considered workarounds.

Regards, Dave.

Re: Problem in Pg 8.1.4 with CREATEDB

From
Tom Lane
Date:
"Dave Page" <dpage@vale-housing.co.uk> writes:
> I don't think anyone ever imagined that the bug actually allowed people
> to use utilities in a way that was useful to them, but unintended by
> everyone else. Had we done, we would certainly have made the warnings
> more obvious and considered workarounds.

Actually, we thought that this had all been resolved years ago when we
made the Unix versions work like that; fixing the Windows code to behave
like the Unix versions seemed minor.

What I find surprising is that it seems a substantial community of apps
is already in existence that have never been run with anything but
Windows Postgres.

            regards, tom lane

Re: Problem in Pg 8.1.4 with CREATEDB

From
"Magnus Hagander"
Date:
> > I don't think anyone ever imagined that the bug actually allowed
> > people to use utilities in a way that was useful to them, but
> > unintended by everyone else. Had we done, we would
> certainly have made
> > the warnings more obvious and considered workarounds.
>
> Actually, we thought that this had all been resolved years
> ago when we made the Unix versions work like that; fixing the
> Windows code to behave like the Unix versions seemed minor.

Yeah...


> What I find surprising is that it seems a substantial
> community of apps is already in existence that have never
> been run with anything but Windows Postgres.

Doesn't surprise me one bit, really.

Also, remember that we're talking win32 *client*, which has been around
a long time. psql, for example, has built on win32 since 6.something
IIRC. So you could very well have client apps and such that used that
behaviour running against a Unix PostgreSQL.

//Magnus

Re: Problem in Pg 8.1.4 with CREATEDB

From
"Pit M."
Date:
Alexander Scholz wrote:
> Yes, we have the same problem!  Refer to the thread with the subject
> "Problem V8.1.4 - providing pwd for commandline tools doesn't work anymore".
>
> They seem to have change the old behaviour of the commandline tools,
> which worked well since 8.0! I don't understand why the change should be
> "more secure", but I see that nobody took care about the possible
> consequences for installation scripts, third party applications and so
> on. :-(((
>
> At least they should have clearly stated this in the update readme. (The
> comment "Fix problem with password prompting on some Win32 systems" just
> says nothing at all, which could have "alerted" anybody that might
> concern the effect of it)
>
> Sigh,
>
> Alexander.

Thank you for this hint.
We will have to change our setup asap. Which one of the methods passing
a password do you prefer ?
Setting the Password as a environment variable doesn't seem to be very
secure to me :-)

Pit