Re: 8.4 installer

From: David Spadea <david(dot)spadea(at)gmail(dot)com>
To: Christine Penner <christine(at)ingenioussoftware(dot)com>
Cc: Postgres-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: 8.4 installer
Date: 2009-09-22 00:27:40
Message-ID: 4ae0cb070909211727s2389dc45m7b66a38e6fd85b4c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Christine,

Sorry for the extra mail. I inadvertently dropped the mailing list from the
recipients. Editing a bit and re-sending...

For your first question, I guess it's a matter of opinion and what you
really plan on using the database for. If you're just using it for some
personal project, it doesn't really matter. For enterprise stuff, I would
tend to segregate it out to some standard location outside of Program Files.
Some more information about your intended deployment case would help.

As for your error message with initdb:

"C:/Program Files/PostgreSQL/8.4/bin/C:PostgresData/postgresql.conf": No
such file or directory
I was able to reproduce your error on my machine. Can you please add a
backslash to your path after the C: -- e.g. "C:\PostgresData" rather than
"C:PostgresData" ?

In the general case, saying "C:PostgresData" tells Windows that PostgresData
is a subdirectory of the current working directory on C:. When you use the
"\", you tell it that the path is relative to the root of C:. That way it
doesn't try to concatenate the current working directory with the given
path.

In this case, it seems like initdb is actually taking "C:PostgresData" to be
the literal name of the directory. It doesn't even seem to recognize that C:
is a drive specifier at all. However, if you say "mkdir C:test", Windows
will create a directory called "test" in the current directory of C:

This behavior seems wrong to me, and I think this could be a bug in initdb
on Windows. The current behavior seems to work fine for full path names, or
relative names without a drive specifier, but handling of relative paths
containing a drive specifier seems to be incorrect. I'd be interested to
hear others' takes on it, and whether there's a legitimate reason for this
behavior.

---
David Spadea
Spadea Enterprises, Inc
http://www.spadea.net

On Mon, Sep 21, 2009 at 6:13 PM, Christine Penner <
christine(at)ingenioussoftware(dot)com> wrote:

> David,
>
> 1st question: I assume it's better to put the data directory anywhere but
> in program files. Is that right?
>
> I had to uninstall, delete stuff and clean things up and do another install
> because it was telling me that initdb.exe was not a valid win32 application.
> Again I get an empty data directory. I then ran this line in the command
> window:
>
> C:\Program Files\PostgreSQL\8.4\bin>initdb.exe -D C:\Program
> Files\PostgreSQL\8.4\data
> I decided to keep the data in program files (the default directory
> because I thought keeping the defaults would work better.
>
> This time I got a bunch of messages saying it was initializing and creating
> stuff, then it said it was successful. It looked like it worked, but it was
> the same thing. I didn't copy those messages because I thought it was good.
>
> Again I ran this (this time moving the data directory outside of program
> files.)
>
> C:\Program Files\PostgreSQL\8.4\bin>initdb.exe -D C:PostgresData
> The files belonging to this database system will be owned by user "User".
> This user must also own the server process.
>
> The database cluster will be initialized with locale English_Canada.1252.
> The default database encoding has accordingly been set to WIN1252.
> The default text search configuration will be set to "english".
>
> creating directory C:\PostgresData ... ok
> creating subdirectories ... ok
> selecting default max_connections ... 10
> selecting default shared_buffers ... 400kB
> creating configuration files ... ok
> creating template1 database in C:PostgresData/base/1 ... C:/Program
> Files/Postgr
> eSQL/8.4/bin/postgres.exe cannot access the server configuration file
> "C:/Progra
> m Files/PostgreSQL/8.4/bin/C:PostgresData/postgresql.conf": No such file or
> dire
> ctory
> child process exited with exit code 1
> initdb: removing data directory "C:PostgresData"
>
> At 02:12 PM 21/09/2009, you wrote:
>
>> Christine,
>>
>> What happens if you run it from a command prompt? (Start -> Run -> "cmd")Â
>> Can you please post the command line you're using and its output?
>>
>> Note that you may need to provide a full path to initdb if it isn't in a
>> place covered by your PATH variable. Also, try giving a full path to the
>> data directory for your -D argument. It might not be finding one of them.
>>
>> ---
>> David Spadea
>> Spadea Enterprises, Inc
>> <http://www.spadea.net>http://www.spadea.net
>>
>>
>> On Mon, Sep 21, 2009 at 10:53 AM, Christine Penner <<mailto:
>> christine(at)ingenioussoftware(dot)com>christine(at)ingenioussoftware(dot)com> wrote:
>> I did that. I saw something flash and then nothing happened. I still have
>> an empty data directory.
>> Christine
>>
>> At 12:59 AM 19/09/2009, you wrote:
>>
>>> Christine,
>>> Try running "initdb" to set up the data directory.
>>> initdb -D /path/to/data
>>> That will populate your pg_hba and postgres config files in the directory
>>> you specify.
>>> ---
>>> David Spadea
>>> Spadea Enterprises, Inc
>>> <http://www.spadea.net>http://www.spadea.net
>>>
>>> On Wed, Sep 16, 2009 at 2:21 PM, Christine Penner <<mailto:
>>> christine(at)ingenioussoftware(dot)com> christine(at)ingenioussoftware(dot)com> wrote:
>>> Hi,
>>> I'm using Windows XP Pro.
>>> I am trying to install Postgres 8.4. I had 8.3 installed. Because I
>>> didn't have any important data, to make it easier I removed 8.3, the data
>>> directory, removed the Postgres windows user and removed all registry values
>>> I could find. I also shut down my anti virus and anti spyware software that
>>> was running (and restarted my computer).
>>> When I run the postgres installer (postgresql-8.4.0-1-windows.exe) I get
>>> an error about the file postgresSQL.conf not being found. When the installer
>>> finishes I have an empty data directory. I also tried installing the data
>>> directory in a place other than the program files directory. I have done
>>> this a few times now and I'm just not seeing what I'm missing. When I
>>> originally installed Postgres 8.3 I didn't use the one click installer.
>>> Since then I have upgraded to another 8.3.x without any issues.
>>> Christine Penner
>>> Ingenious Software
>>> 250-352-9495
>>> <mailto:christine(at)ingenioussoftware(dot)com>christine(at)ingenioussoftware(dot)com
>>> --
>>> Sent via pgsql-general mailing list (<mailto:
>>> pgsql-general(at)postgresql(dot)org> pgsql-general(at)postgresql(dot)org)
>>> To make changes to your subscription:
>>> <http://www.postgresql.org/mailpref/pgsql-general>
>>> http://www.postgresql.org/mailpref/pgsql-general
>>>
>>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris 2009-09-22 07:27:11 Re: Insert unique fails, still increments ID in a lookup table
Previous Message Christine Penner 2009-09-21 22:13:59 Re: 8.4 installer