Re: How do I create a database if I can't connect to it?

Поиск
Список
Период
Сортировка
От Paolo Victor
Тема Re: How do I create a database if I can't connect to it?
Дата
Msg-id f8c46d190707271039m3484c811s885e631863b45e64@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How do I create a database if I can't connect to it?  ("Paolo Victor" <paolovictor@gmail.com>)
Ответы Re: How do I create a database if I can't connect to it?  ("Paolo Victor" <paolovictor@gmail.com>)
Список pgsql-general


On 7/27/07, Paolo Victor <paolovictor@gmail.com> wrote:
Ok, I found the problem: Permissions.

Although I -do- have write/read/exec permission /usr/local/pgsql , some files couldn't be copied after the install, probably rendering PG a bit unstable =)

Erm, I guess I mean "the config proccess failed" =) 

I tried installing PG in a folder in my home directory, and it worked like a charm.

Here's the output of the "sudo make install" command, when I tried installing it at /usr/local/pgsql :

/*
  Actually, for the sake of the internet's tubes, I'll just post the error (and last) lines.

  And for our non-portuguese-speaking friends:
  Entrando no diretório = Entering Directory
  Saindo do diretório = Leaving directory
*/

make[4]: Entrando no diretório `/home/paolo/Desktop/postgresql- 8.2.4/src/interfaces/ecpg/include'
cd ../../../.. && ./config.status src/interfaces/ecpg/include/ecpg_config.h
./config.status: line 91: conf20566.sh: Permission denied
./config.status: line 92: conf20566.sh : Permission denied
chmod: cannot access `conf20566.sh': No such file or directory
./config.status: line 206: conf20566.file: Permission denied
sed: couldn't close stdout: Permission denied
cat: write error: Permission denied
mkdir: cannot create directory `./confstat20566-20898': Permission denied
: cannot create a temporary directory in .
make[4]: ** [../../../../src/interfaces/ecpg/include/ecpg_config.h] Erro 1
make[4]: Saindo do diretório `/home/paolo/Desktop/postgresql- 8.2.4/src/interfaces/ecpg/include'
make[3]: ** [install] Erro 2
make[3]: Saindo do diretório `/home/paolo/Desktop/postgresql-8.2.4/src/interfaces/ecpg'
make[2]: ** [install] Erro 2
make[2]: Saindo do diretório `/home/paolo/Desktop/postgresql- 8.2.4/src/interfaces'
make[1]: ** [install] Erro 2
make[1]: Saindo do diretório `/home/paolo/Desktop/postgresql-8.2.4/src'
make: ** [install] Erro 2

On 7/27/07, Paolo Victor <paolovictor@gmail.com> wrote:
First: Thanks for all the advice!

David:

I tried installing the system's packages, but as I plan using the python procedures feature, I've got to compile it with the "--with-python" option. I'm not sure if the default package already includes the feature, but since the createlang command failed and I found out on some forum (sorry, I lost the link) that I had to compile PG with this option set, I tried compiling PG myself.

Oh, and I've already compiled PG before (but without the python option) and had no problems. I'm trying to compile the 8.2.4 version, I'll try with 8.2.3.

Scott, Merlin:

When I try to connect to one of the default databases, here's what I get:

paolo@box:~$ psql -d template1 -p 5435
NOTICE:  table "pg_class" was reindexed
NOTICE:  table "sql_sizing" was reindexed
NOTICE:  table "sql_sizing_profiles" was reindexed
NOTICE:  table "sql_features" was reindexed
NOTICE:  table "sql_implementation_info" was reindexed
NOTICE:  table "sql_languages" was reindexed
NOTICE:  table "sql_packages" was reindexed
NOTICE:  table "sql_parts" was reindexed
NOTICE:  table "pg_statistic" was reindexed
NOTICE:  table "pg_type" was reindexed
NOTICE:  table "pg_attribute" was reindexed
NOTICE:  table "pg_proc" was reindexed
NOTICE:  table "pg_autovacuum" was reindexed
NOTICE:  table "pg_attrdef" was reindexed
NOTICE:  table "pg_constraint" was reindexed
NOTICE:  table "pg_inherits" was reindexed
NOTICE:  table "pg_index" was reindexed
NOTICE:  table "pg_operator" was reindexed
NOTICE:  table "pg_opclass" was reindexed
NOTICE:  table "pg_am" was reindexed
NOTICE:  table "pg_amop" was reindexed
NOTICE:  table "pg_amproc" was reindexed
NOTICE:  table "pg_language" was reindexed
NOTICE:  table "pg_largeobject" was reindexed
NOTICE:  table "pg_aggregate" was reindexed
NOTICE:  table "pg_rewrite" was reindexed
NOTICE:  table "pg_trigger" was reindexed
NOTICE:  table "pg_description" was reindexed
NOTICE:  table "pg_cast" was reindexed
NOTICE:  table "pg_namespace" was reindexed
NOTICE:  table "pg_conversion" was reindexed
NOTICE:  table "pg_depend" was reindexed
REINDEX

I get the same output when I execute the createuser command.


On 7/27/07, Merlin Moncure <mmoncure@gmail.com > wrote:
On 7/27/07, David Fetter < david@fetter.org > wrote:
> On Fri, Jul 27, 2007 at 11:28:58AM -0300, Paolo Victor wrote:
> > Hello,
> >
> > For a short description, I'll just show the sequence of commands I'm trying
> > to execute:
> >
> > paolo@box> initdb -D /usr/local/pgsql/data/
>
> This looks like a mistake.  Unless you plan to develop the PostgreSQL
> code itself, you should not be installing from source.  Instead, you
> should be using one from the packaging system your operating system
> uses.

I don't necessarily agree with this advice.  I encourage everyone who
is considering serious development with PostgreSQL to become familiar
with the database architecture...there are advantages to compiling
from source yourself if you know what you are doing, and simply
learning how to do it is a good exercise.

I am also very suspicious of the assertion that knowledge of how to
manually invoke initdb is not necessary.  While the binary vs source
argument certainly debatable, I would certainly advise every
PostgreSQL dba to memorize the initdb man page for various reasons.
However, there are few reasons to run postgres directly, we normally
rely on pg_ctl for that (but it's still useful to know it can be
done).

anyways, to the OP, you need to connect to one of the default
databases (postgres, or template1) and create one from there...or
invoke the createdb command.

merlin



В списке pgsql-general по дате отправления:

Предыдущее
От: "Paolo Victor"
Дата:
Сообщение: Re: How do I create a database if I can't connect to it?
Следующее
От: "Paolo Victor"
Дата:
Сообщение: Re: How do I create a database if I can't connect to it?