Re: Problem with initdb: creates database which do not exists - Mailing list pgsql-general
From | Adrian Klaver |
---|---|
Subject | Re: Problem with initdb: creates database which do not exists |
Date | |
Msg-id | 201010180807.50792.adrian.klaver@gmail.com Whole thread Raw |
In response to | Problem with initdb: creates database which do not exists (Torsten Zühlsdorff <foo@meisterderspiele.de>) |
Responses |
Re: Problem with initdb: creates database which do not exists
|
List | pgsql-general |
On Monday 18 October 2010 7:46:21 am Torsten Zühlsdorff wrote: > 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. My guess is that you have more than one installation of Postgres. The initdb is working on one cluster and your psql is pointing at another. You might want to do a ps to see what is running. -- Adrian Klaver adrian.klaver@gmail.com
pgsql-general by date: