Обсуждение: template0

Поиск
Список
Период
Сортировка

template0

От
"Marcel Wolf"
Дата:

Guys

I am trying to log on to the template0 to create a new database. The error I get is ……

 

Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: Database "template0" is not currently accepting connections .

 

How do I get the template0 to accept connections?  I can get template1 to accept them. But then I have a problem with new databases inheriting tables from the first database. My pg_hba.conf file is

 

 

 

# TYPE  DATABASE    USER        IP-ADDRESS        IP-MASK           METHOD

 

local   all         all                                             trust

# IPv4-style local connections:

host    all         all         127.0.0.1         255.255.255.0     trust

host      all             postgre                     192.168.1.5         255.255.255.0      trust

 

# IPv6-style local connections:

host    all         all         ::1               ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff        trust

 

Thanks for the help

Marcel Wolf

Re: template0

От
Tom Lane
Дата:
"Marcel Wolf" <mwolfs@comcast.net> writes:
> How do I get the template0 to accept connections?

It's not supposed to.

> I can get template1
> to accept them. But then I have a problem with new databases inheriting
> tables from the first database.

The database used as the template is specified in your CREATE DATABASE
command.  It has nothing to do with which DB you are connected to.

            regards, tom lane

Re: template0

От
Josh Berkus
Дата:
Marcel,

See:
http://techdocs.postgresql.org/techdocs/pgsqladventuresep1.php

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco