Re: postgres maintenance db

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: postgres maintenance db
Дата
Msg-id 1343381929.1959.70.camel@localhost.localdomain
обсуждение исходный текст
Ответ на postgres maintenance db  (hartrc <rhart2@mt.gov>)
Список pgsql-general
On Thu, 2012-07-26 at 15:07 -0700, hartrc wrote:
> I'm using postgres 9.1.4 on Suse Linux Enterprise Server 11.
> After successful installation I by default have one database installed
> called postgres.
>
> I'm starting the process of migrating some database schemas off Oracle and
> mysql onto postgres but I want to understand how to best set up the
> "databases".
>
> What is the purpose of the postgres database?

It's the default database for tools like createdb, createuser,
createlang, dropdb, dropuser, etc.

>  I try and drop it and get
> "maintenance database can't be dropped" error.
>

This is a pgAdmin message. It doesn't mean you can't drop it with the
usual way (DROP DATABASE statement, or the dropdb tool), or with pgAdmin
(but you first need to change the maintenance database of your server...
BTW, the maintenance database is an expression specific to pgAdmin).

> Should I create a separate database that has all my application schemas in
> it and let the postgres database be stand-alone, or should I put my
> application schemas inside the postgres database?

Your choice :)

> I didn't really want my database to be called postgres, can it be renamed?
>

Well, you can drop it or rename it. It will make your life quite hard
with the usual tools (createdb and the like). It's way better to add a
new database, and keep the postgres database.


--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com


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

Предыдущее
От: Mark Morgan Lloyd
Дата:
Сообщение: Re: Terminating a rogue connection
Следующее
От: Jacqui Caren
Дата:
Сообщение: Re: BI tools and postgresql