Problem with initdb: creates database which do not exists

Поиск
Список
Период
Сортировка
От Torsten Zühlsdorff
Тема Problem with initdb: creates database which do not exists
Дата
Msg-id i9hmjt$9ag$1@news.eternal-september.org
обсуждение исходный текст
Ответы Re: Problem with initdb: creates database which do not exists  (Thom Brown <thom@linux.com>)
Re: Problem with initdb: creates database which do not exists  (Adrian Klaver <adrian.klaver@gmail.com>)
Список pgsql-general
Hello,

i'm using initdb of an PostgreSQL 8.4 installed over the port-system of
FreeBSD:

=====

 > initdb foo --locale=de_DE.UTF-8 --lc-collate=de_DE.UTF-8
--lc-ctype=de_DE.UTF-8 --lc-messages=de_DE.UTF-8
--lc-monetary=de_DE.UTF-8 --lc-numeric=de_DE.UTF-8 --lc-time=de_DE.UTF-8
The files belonging to this database system will be owned by user "thorny".
This user must also own the server process.

The database cluster will be initialized with locale de_DE.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "german".

creating directory foo ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in foo/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.

Success. You can now start the database server using:

     postgres -D foo
or
     pg_ctl -D foo -l logfile start

=====

After that the database is not visible:

=====

 > psql -l
                            List of databases
     Name    | Owner  | Encoding | Collation | Ctype | Access privileges
------------+--------+----------+-----------+-------+-------------------
  pgsql      | pgsql  | UTF8     | C         | C     |
  postgres   | pgsql  | UTF8     | C         | C     |
  template0  | pgsql  | UTF8     | C         | C     | =c/pgsql
                                                     : pgsql=CTc/pgsql
  template1  | pgsql  | UTF8     | C         | C     | =c/pgsql
                                                     : pgsql=CTc/pgsql
(4 rows)

=====

So i try again to create it:

=====

 > initdb foo --locale=de_DE.UTF-8 --lc-collate=de_DE.UTF-8
--lc-ctype=de_DE.UTF-8 --lc-messages=de_DE.UTF-8
--lc-monetary=de_DE.UTF-8 --lc-numeric=de_DE.UTF-8 --lc-time=de_DE.UTF-8
The files belonging to this database system will be owned by user "thorny".
This user must also own the server process.

The database cluster will be initialized with locale de_DE.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "german".

initdb: directory "foo" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "foo" or run initdb
with an argument other than "foo".

=====

Thats interessting. But i can't drop the database:

=====

 > dropdb foo
dropdb: database removal failed: ERROR:  database "foo" does not exist

=====

So: any idea why the database is not visible? And how do get rid of the
"non-existing" databases ;)

Thanks for your time,
Torsten
--
http://www.dddbl.de - ein Datenbank-Layer, der die Arbeit mit 8
verschiedenen Datenbanksystemen abstrahiert,
Queries von Applikationen trennt und automatisch die Query-Ergebnisse
auswerten kann.

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Question on STABLE functions limitations
Следующее
От: Greg Smith
Дата:
Сообщение: Re: installing from source in Windows