Skip site navigation (1) Skip section navigation (2)

Re: Initial max_connections for initdb on FreeBSD.

From: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Initial max_connections for initdb on FreeBSD.
Date: 2008-05-29 20:50:27
Message-ID: 483F1713.7030001@Sheeky.Biz (view raw or flat)
Thread:
Lists: pgsql-hackers
Greg Sabino Mullane wrote:
> -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160
> 
> 
> I've got a BSD system I work on that is jailed and has low shared
> memory settings. So low that I cannot even initdb to create a test
> 8.3.1 database. It tries to create template1 with shared_buffers of
> 50 and max_connections of 13. Is there any way to tweak those during
> initdb? Should there or can there be? Is there another way around
> this problem that can be somewhat automated? For my testing purposes,
> I don't need high settings at all (max_connections could be 2, for
> example).
> 

 From the manual I get -

initdb uses uses the environment variables supported by libpq

PGOPTIONS sets additional run-time options for the PostgreSQL server

postgres -

-B nbuffers
Sets the number of shared buffers for use by the server processes. The
default value of this parameter is chosen automatically by initdb.
Specifying this option is equivalent to setting the shared_buffers
configuration parameter.

-N max-connections
Sets the maximum number of client connections that this server will
accept. The default value of this parameter is chosen automatically by
initdb. Specifying this option is equivalent to setting the
max_connections configuration parameter.



So I would try something like -

setenv PGOPTIONS -N 2 -B 10  (or export depending on shell)
initdb -D /path/to/data


-- 

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz

In response to

pgsql-hackers by date

Next:From: David FetterDate: 2008-05-29 20:50:51
Subject: Re: Core team statement on replication in PostgreSQL
Previous:From: Tom LaneDate: 2008-05-29 20:44:19
Subject: Re: Core team statement on replication in PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group