Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E53B21337B54 for ; Mon, 21 Mar 2011 13:15:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 67499-07 for ; Mon, 21 Mar 2011 16:15:05 +0000 (UTC) X-Greylist: delayed 00:09:38.24288 by SQLgrey-1.7.6 Received: from mail-chaos.rambler.ru (mail-chaos.rambler.ru [81.19.68.130]) by mail.postgresql.org (Postfix) with ESMTP id 63BBC1336FA7 for ; Mon, 21 Mar 2011 13:14:53 -0300 (ADT) Received: from citrin.office.vega.ru (gw1.masterhost.ru [87.242.97.4]) (Authenticated sender: citrin@citrin.ru) by mail-chaos.rambler.ru (Postfix) with ESMTPSA id 1D66917073 for ; Mon, 21 Mar 2011 19:05:13 +0300 (MSK) Message-ID: <4D877738.7000609@citrin.ru> Date: Mon, 21 Mar 2011 19:05:12 +0300 From: Anton Yuzhaninov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.15) Gecko/20110309 Thunderbird/3.1.9 MIME-Version: 1.0 To: pgsql-docs@postgreSQL.org Subject: number of semaphores and semaphore sets Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201103/112 X-Sequence-Number: 6545 This page: http://www.postgresql.org/docs/9.0/interactive/kernel-resources.html has formula: ceil((max_connections + autovacuum_max_workers) / 16) for number of semaphore sets (identifiers). It seems to be wrong (outdated). Correct formula seems to be ceil((max_connections + autovacuum_max_workers + 4) / 16) Semaphore sets created in src/backend/storage/lmgr/proc.c: 1. MaxConnections 2. autovacuum_max_workers + 1 3. NUM_AUXILIARY_PROCS (currently 3) -- Anton Yuzhaninov