PostgreSQL BSDI BSD/OS port

Поиск
Список
Период
Сортировка
От David J. MacKenzie
Тема PostgreSQL BSDI BSD/OS port
Дата
Msg-id 14693.61301.820389.471766@air.web.us.uu.net
обсуждение исходный текст
Ответы Re: PostgreSQL BSDI BSD/OS port  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-ports
Some corrections for the BSD/OS port.  BSD/OS doesn't define
LC_MESSAGES, so that needs to be ifdef'd, and the kernel tuning
parameters are incomplete and suboptimal.

Index: src/backend/utils/adt/pg_locale.c
===================================================================
RCS file: /export/src/CVS/usr.local/bin/postgresql-7.0/src/backend/utils/adt/pg_locale.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- src/backend/utils/adt/pg_locale.c    2000/06/30 21:15:43    1.1
+++ src/backend/utils/adt/pg_locale.c    2000/06/30 22:51:00    1.2
@@ -40,7 +40,9 @@
     lc->lc_time = setlocale(LC_TIME, NULL);
     lc->lc_collate = setlocale(LC_COLLATE, NULL);
     lc->lc_monetary = setlocale(LC_MONETARY, NULL);
+#ifdef LC_MESSAGES
     lc->lc_messages = setlocale(LC_MESSAGES, NULL);
+#endif /* LC_MESSAGES */

     return lc;
 }
@@ -62,7 +64,11 @@
          lc->lc_time,
          lc->lc_collate,
          lc->lc_monetary,
+#ifdef LC_MESSAGES
          lc->lc_messages
+#else /* LC_MESSAGES */
+         "unimplemented"
+#endif /* LC_MESSAGES */
     );

     return lc;
@@ -92,8 +98,10 @@
     if (!setlocale(LC_MONETARY, lc->lc_monetary))
         elog(NOTICE, "pg_setlocale(): 'LC_MONETARY=%s' cannot be honored.", lc->lc_monetary);

+#ifdef LC_MESSAGES
     if (!setlocale(LC_MESSAGES, lc->lc_messages))
         elog(NOTICE, "pg_setlocale(): 'LC_MESSAGE=%s' cannot be honored.", lc->lc_messages);
+#endif /* LC_MESSAGES */

     return lc;
 }

Index: doc/FAQ_BSDI
===================================================================
diff -u -r1.1 -r1.2
--- doc/FAQ_BSDI    2000/06/30 21:15:35    1.1
+++ doc/FAQ_BSDI    2000/07/07 14:23:18    1.2
@@ -8,12 +8,49 @@

 ---------------------------------------------------------------------------

+You may need to increase the number of sysv semaphores.
+PostgreSQL 7 allowing the default number of backend connections
+allocates 32 semaphores, which is just over half the default system
+total of 60.
+
+The defaults are in /sys/sys/sem.h:
+
+/* Configuration parameters */
+#ifndef SEMMNI
+#define SEMMNI  10              /* # of semaphore identifiers */
+#endif
+#ifndef SEMMNS
+#define SEMMNS  60              /* # of semaphores in system */
+#endif
+#ifndef SEMUME
+#define SEMUME  10              /* max # of undo entries per process */
+#endif
+#ifndef SEMMNU
+#define SEMMNU  30              /* # of undo structures in system */
+#endif
+
+Set the values you want in your kernel config file, e.g.:
+
+options "SEMMNI=40"
+options "SEMMNS=240"
+options "SEMUME=40"
+options "SEMMNU=120"
+
+---------------------------------------------------------------------------
+
 Increase SHMMAXPGS by 1024 for every additional 4MB of shared
 memory:

 /sys/sys/shm.h:69:#define       SHMMAXPGS       1024    /* max hardware pages...

 The default setting of 1024 is for a maximum of 4MB of shared memory.
+PostgresSQL 7 allowing the default number of backend connections
+allocates about 1.2MB of shared memory.
+
+Enclose the above line with "#ifndef SHMMAXPGS" and "#endif", and in
+your kernel config file set the desired value, e.g.:
+
+options "SHMMAXPGS=8192"

 For those running 4.1 or later, just recompile the kernel and reboot.
 For those running earlier releases, there are more steps outlined below.
@@ -24,11 +61,17 @@
 This is computed dynamically at bootup.

     $ bpatch -r sysptsize
-    0x9 = 9
+    0x16 = 22

-Next, change SYSPTSIZE to a hard-coded value.  Use the bpatch value,
-plus add 1 for every additional 4MB of shared memory you desire.
+Set SYSPTSIZE in your kernel config file, e.g.:

+options "SYSPTSIZE=29"
+
+Use the bpatch value, plus add 1 for every additional 4MB of shared
+memory you desire.  For reference, the default is set here:
+
 /sys/i386/i386/i386_param.c:28:#define  SYSPTSIZE 0        /* dynamically...

 sysptsize can not be changed by sysctl on the fly.
+
+---------------------------------------------------------------------------

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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] fail in installing postgresql-6.5.3 to FreeBSD
Следующее
От: "Frederic De Leersnijder"
Дата:
Сообщение: can not guess host type