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

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

initdb

От
"Pablo Morales"
Дата:
Hi there.

I've gotta problem with initdb, the first time I initialized the base, it
went on ok, , under the /data directory I had template1, and a test database
I created, a few days ago, I have some problems an decided to intialize it
again, to begin from scratch, but initdb does not create the same
directories structure, instead it creates directories with number names, ej,
14556, 1, 15555, and inside those directories, archives with the same
patern,  for example 000000000.

This happened on Suse  and FreeBSD, at home I've got red hat and it's
working fine, but do not know if it's a bug or if it will happen in my red
hat machine.


 What's going on?
 Lotta thanx.






Re: initdb

От
Alvaro Herrera
Дата:
Pablo Morales dijo:

Hola:

> I've gotta problem with initdb, the first time I initialized the base, it
> went on ok, , under the /data directory I had template1, and a test database
> I created, a few days ago, I have some problems an decided to intialize it
> again, to begin from scratch, but initdb does not create the same
> directories structure, instead it creates directories with number names, ej,
> 14556, 1, 15555, and inside those directories, archives with the same
> patern,  for example 000000000.

Starting with 7.1, files and directories are named using their OID
rather than name.  This allows for example for rolling back a DROP TABLE
statement and other "cool stuff Oracle doesn't have" :-)

Anyway seems pretty difficult to have some file named 0000000000000000
in your database directories; that kind of thing is restricted to
pg_xlog.

> This happened on Suse  and FreeBSD, at home I've got red hat and it's
> working fine, but do not know if it's a bug or if it will happen in my red
> hat machine.

It will happen as soon as you upgrade.  It's a feature, not a bug.  You
can use contrib/oid2name for looking up the names.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"El destino baraja y nosotros jugamos" (A. Schopenhauer)