Convert OID intergers to path strings.

Поиск
Список
Период
Сортировка
От fulan Peng
Тема Convert OID intergers to path strings.
Дата
Msg-id bf0f1bc90909131106k1cc69dcagac0d43a7b09ead5d@mail.gmail.com
обсуждение исходный текст
Ответы Re: Convert OID intergers to path strings.
Список pgsql-committers
Hi, committers!

I am naive for postgresql. I have millions of tiny databases. When I
was trying to createdb, it fails because each database is saved in
$PG_DATA/base/Oid.  In UFS system, one directory maximum can hold
32768 subdirectories.

Oid is 4 byte integer. Subdirectory is a path name with maximum 32768
variations.  Use Oid as a directory name to save object is not a good
practice because they are different object.

For myself, I want to make 2 functions Oid2Dir and Dir2Oid. For example:

Oid                        Dir                      Object Location
1                       00/00/00/01            00/00/00/01/1
10                     00/00/00/0A            00/00/00/0A/10
255                   00/00/00/FF             00/00/00/FF/255
65535               00/00/FF/FF              00/00/FF/FF/65535
....                      ....                             ....
4294967285     FF/FF/FF/FF                 FF/FF/FF/FF/4294967285

This is the way you guys can map all of your objects on disk without
worry of break the limitation of the file system.
This will make postgresql one more reason better than mysql. I wish
someone would help me.

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

Предыдущее
От: andreas@pgfoundry.org (User Andreas)
Дата:
Сообщение: docbot - docbot: - incorporate changes from running docbot
Следующее
От: heikki@postgresql.org (Heikki Linnakangas)
Дата:
Сообщение: pgsql: Don't error out if recycling or removing an old WAL segment fails