С солярисом разбираюсь неделю.
До этого все время работал во 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 в ядре ?
Спасибо.
>С солярисом разбираюсь неделю.
>До этого все время работал во 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
>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...
Сколько ж ставить, чтобы не завалить систему ?
Прописал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 directoryinitdb: failed
Постгрес вообще на солярку нормально становится ?
Где искать-то эти библиотеки ?
Библиотеки на месте !!!
Помогите, кто-нибудь, кто ставил PostgreSQL на Соляру.
Может где ссылочку сделать ?
Вот еще :# 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
>Вот еще :
>
># 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.1Da ti ih uze na6el:
>/usr/local/lib/libgcc_s.so.1
>/usr/local/pgsql/lib/ascii_and_mic.soTolko 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_PATHEsli 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.
>Прописал
>
>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" это так ?
>Прописал
>
>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
>LD_LIBRARY_PATH=/usr/local/lib:/lib:/usr/lib:/usr/ccs/lib
>export LD_LIBRARY_PATHДа, спасибо, помогло.
Работает :)