URL: https://www.opennet.me/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID1
Нить номер: 44760
[ Назад ]

Исходное сообщение
"initdb PostgreSQL 7.4.2 в Solaris 8"

Отправлено vavcg , 03-Июн-04 17:21 
С солярисом разбираюсь неделю.
До этого все время работал во FreeBSD.
Скомпилил PostgreSQL 7.4.2, пытаюсь запустить initdb и вот что пишет:

# /usr/local/pgsql/bin/initdb -D /export/spare/pgsql_db/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /export/spare/pgsql_db/data... ok
creating directory /export/spare/pgsql_db/data/base... ok
creating directory /export/spare/pgsql_db/data/global... ok
creating directory /export/spare/pgsql_db/data/pg_xlog... ok
creating directory /export/spare/pgsql_db/data/pg_clog... ok
selecting default max_connections... 10
selecting default shared_buffers... 50
creating configuration files... ok
creating template1 database in /export/spare/pgsql_db/data/base/1... FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=1, size=1081344, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 1081344 bytes), reduce PostgreSQL's shared_buffers parameter (currently 50) and/or its max_connections parameter (currently 10).
        If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
        The PostgreSQL documentation contains more information about shared memory configuration.

initdb: failed

Все понятно, так вот как мне увеличить SHMMAX в ядре ?
Спасибо.


Содержание

Сообщения в этом обсуждении
"initdb PostgreSQL 7.4.2 в Solaris 8"
Отправлено Brainbug , 03-Июн-04 17:29 
>С солярисом разбираюсь неделю.
>До этого все время работал во FreeBSD.
>Скомпилил PostgreSQL 7.4.2, пытаюсь запустить initdb и вот что пишет:
>
># /usr/local/pgsql/bin/initdb -D /export/spare/pgsql_db/data
>The files belonging to this database system will be owned by user
>"postgres".
>This user must also own the server process.
>
>The database cluster will be initialized with locale C.
>
>fixing permissions on existing directory /export/spare/pgsql_db/data... ok
>creating directory /export/spare/pgsql_db/data/base... ok
>creating directory /export/spare/pgsql_db/data/global... ok
>creating directory /export/spare/pgsql_db/data/pg_xlog... ok
>creating directory /export/spare/pgsql_db/data/pg_clog... ok
>selecting default max_connections... 10
>selecting default shared_buffers... 50
>creating configuration files... ok
>creating template1 database in /export/spare/pgsql_db/data/base/1... FATAL:  could not create shared memory
>segment: Invalid argument
>DETAIL:  Failed system call was shmget(key=1, size=1081344, 03600).
>HINT:  This error usually means that PostgreSQL's request for a shared
>memory segment exceeded your kernel's SHMMAX parameter.  You can either
>reduce the request size or reconfigure the kernel with larger SHMMAX.
> To reduce the request size (currently 1081344 bytes), reduce PostgreSQL's
>shared_buffers parameter (currently 50) and/or its max_connections parameter (currently 10).
>        If the request size
>is already small, it's possible that it is less than your
>kernel's SHMMIN parameter, in which case raising the request size or
>reconfiguring SHMMIN is called for.
>        The PostgreSQL documentation contains
>more information about shared memory configuration.
>
>initdb: failed
>
>Все понятно, так вот как мне увеличить SHMMAX в ядре ?
>Спасибо.

http://docs.sun.com/source/816-5794-11/db_tune.html
http://forum.sun.com/thread.jsp?forum=10&thread=13617
http://forum.sun.com/thread.jsp?forum=10&thread=7098


"initdb PostgreSQL 7.4.2 в Solaris 8"
Отправлено vavcg , 03-Июн-04 17:48 
>http://docs.sun.com/source/816-5794-11/db_tune.html

Спасибо, эта ссылка прояснила ситуацию.

>http://forum.sun.com/thread.jsp?forum=10&thread=13617
>http://forum.sun.com/thread.jsp?forum=10&thread=7098

А эти навели на мысль о том, что надо придумать подходящее
число для SHMMAX, причем явно не 4294967295.
У меня ведь SunFire V120 с 512Mb RAM...
Сколько ж ставить, чтобы не завалить систему ?


"initdb PostgreSQL 7.4.2 в Solaris 8"
Отправлено vavcg , 03-Июн-04 19:23 
Прописал

set shmsys:shminfo_shmmax=2097152

в файлик /etc/system, т.е. увеличил вдвое значение по умолчанию.
И вот теперь другая ошибка возникла :

# /usr/local/pgsql/bin/initdb -D /export/spare/pgsql_db/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /export/spare/pgsql_db/data... ok
creating directory /export/spare/pgsql_db/data/base... ok
creating directory /export/spare/pgsql_db/data/global... ok
creating directory /export/spare/pgsql_db/data/pg_xlog... ok
creating directory /export/spare/pgsql_db/data/pg_clog... ok
selecting default max_connections... 20
selecting default shared_buffers... 100
creating configuration files... ok
creating template1 database in /export/spare/pgsql_db/data/base/1... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ERROR:  could not load library "/usr/local/pgsql/lib/ascii_and_mic.so": ld.so.1: /usr/local/pgsql/bin/postgres: fatal: libgcc_s.so.1: open failed: No such file or directory

initdb: failed

Постгрес вообще на солярку нормально становится ?
Где искать-то эти библиотеки ?


"initdb PostgreSQL 7.4.2 в Solaris 8"
Отправлено vavcg , 07-Июн-04 18:34 
Библиотеки на месте !!!
Помогите, кто-нибудь, кто ставил PostgreSQL на Соляру.
Может где ссылочку сделать ?

"initdb PostgreSQL 7.4.2 в Solaris 8"
Отправлено vavcg , 07-Июн-04 18:58 
Вот еще :

# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

# find / -name ld.so.1
/usr/lib/sparcv9/ld.so.1
/usr/lib/ld.so.1
/etc/lib/ld.so.1

# find / -name ascii_and_mic.so
/usr/local/pgsql/lib/ascii_and_mic.so

# find / -name libgcc_s.so.1
/usr/local/lib/libgcc_s.so.1
/usr/local/lib/sparcv9/libgcc_s.so.1


"initdb PostgreSQL 7.4.2 в Solaris 8"
Отправлено Brainbug , 08-Июн-04 09:56 
>Вот еще :
>
># echo $PATH
>/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
>
># find / -name ld.so.1
>/usr/lib/sparcv9/ld.so.1
>/usr/lib/ld.so.1
>/etc/lib/ld.so.1
>
># find / -name ascii_and_mic.so
>/usr/local/pgsql/lib/ascii_and_mic.so
>
># find / -name libgcc_s.so.1
>/usr/local/lib/libgcc_s.so.1
>/usr/local/lib/sparcv9/libgcc_s.so.1

Da ti ih uze na6el:
>/usr/local/lib/libgcc_s.so.1
>/usr/local/pgsql/lib/ascii_and_mic.so

Tolko vot ldcofnig ili kak on tam v Solaris nazivajetca ni4ego ob etom ne znajet. Vot i ukazi emu eto delo.

LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib:/usr/ccs/lib:/usr/local/pgsql/lib
export LD_LIBRARY_PATH

Esli eto kone4no ta paremennaja, kotoraja za eto otve4ajet (s Solarisom ne o4en znakom).

P.S. Dannaja situacija opisivajetca v dokumentacii po PostgreSQL. Tak 4to oznakomtes batu6ka.


"initdb PostgreSQL 7.4.2 в Solaris 8"
Отправлено serga , 08-Июн-04 02:56 
>Прописал
>
>set shmsys:shminfo_shmmax=2097152
>
>в файлик /etc/system, т.е. увеличил вдвое значение по умолчанию.
>И вот теперь другая ошибка возникла :
>
># /usr/local/pgsql/bin/initdb -D /export/spare/pgsql_db/data
>The files belonging to this database system will be owned by user
>"postgres".
>This user must also own the server process.
>
>The database cluster will be initialized with locale C.
>
>fixing permissions on existing directory /export/spare/pgsql_db/data... ok
>creating directory /export/spare/pgsql_db/data/base... ok
>creating directory /export/spare/pgsql_db/data/global... ok
>creating directory /export/spare/pgsql_db/data/pg_xlog... ok
>creating directory /export/spare/pgsql_db/data/pg_clog... ok
>selecting default max_connections... 20
>selecting default shared_buffers... 100
>creating configuration files... ok
>creating template1 database in /export/spare/pgsql_db/data/base/1... ok
>initializing pg_shadow... ok
>enabling unlimited row size for system tables... ok
>initializing pg_depend... ok
>creating system views... ok
>loading pg_description... ok
>creating conversions... ERROR:  could not load library "/usr/local/pgsql/lib/ascii_and_mic.so": ld.so.1: /usr/local/pgsql/bin/postgres: fatal:
>libgcc_s.so.1: open failed: No such file or directory
>
>initdb: failed
>
>Постгрес вообще на солярку нормально становится ?
>Где искать-то эти библиотеки ?

>>> /usr/local/pgsql/bin/initdb -D /export/spare/pgsql_db/data
>>>The files belonging to this database system will be owned by user
>>>"postgres".
will be owned by user "postgres" это так ?


"initdb PostgreSQL 7.4.2 в Solaris 8"
Отправлено serga , 08-Июн-04 03:00 
>Прописал
>
>set shmsys:shminfo_shmmax=2097152
>
>в файлик /etc/system, т.е. увеличил вдвое значение по умолчанию.
>И вот теперь другая ошибка возникла :
>
># /usr/local/pgsql/bin/initdb -D /export/spare/pgsql_db/data
>The files belonging to this database system will be owned by user
>"postgres".
>This user must also own the server process.
>
>The database cluster will be initialized with locale C.
>
>fixing permissions on existing directory /export/spare/pgsql_db/data... ok
>creating directory /export/spare/pgsql_db/data/base... ok
>creating directory /export/spare/pgsql_db/data/global... ok
>creating directory /export/spare/pgsql_db/data/pg_xlog... ok
>creating directory /export/spare/pgsql_db/data/pg_clog... ok
>selecting default max_connections... 20
>selecting default shared_buffers... 100
>creating configuration files... ok
>creating template1 database in /export/spare/pgsql_db/data/base/1... ok
>initializing pg_shadow... ok
>enabling unlimited row size for system tables... ok
>initializing pg_depend... ok
>creating system views... ok
>loading pg_description... ok
>creating conversions... ERROR:  could not load library "/usr/local/pgsql/lib/ascii_and_mic.so": ld.so.1: /usr/local/pgsql/bin/postgres: fatal:
>libgcc_s.so.1: open failed: No such file or directory
>
>initdb: failed
>
>Постгрес вообще на солярку нормально становится ?
>Где искать-то эти библиотеки ?
LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib:/usr/ccs/lib
export LD_LIBRARY_PATH


"initdb PostgreSQL 7.4.2 в Solaris 8"
Отправлено vavcg , 08-Июн-04 15:11 
>LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib:/usr/ccs/lib
>export LD_LIBRARY_PATH

Да, спасибо, помогло.
Работает :)