Re: max_prepared_transactions default ... why 5?

From: Decibel! <decibel(at)decibel(dot)org>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: max_prepared_transactions default ... why 5?
Date: 2007-10-18 15:56:39
Message-ID: E31E089F-CBA2-45E1-A16C-40793657E3DD@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Oct 18, 2007, at 12:07 AM, Bruce Momjian wrote:
> Josh Berkus wrote:
>> On Wednesday 17 October 2007 21:35, Tom Lane wrote:
>>> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>>>> I'm writing up the new GUCs, and noticed that
>>>> max_prepared_transactions
>>>> defaults to 5. This is too many for most applications (which
>>>> don't use
>>>> them at all) and far too few for applications which use them
>>>> regularly.
>>>
>>> I think the intention was to have enough so you could test 'em (in
>>> particular, run the regression tests) without eating resources for
>>> the majority of installations that aren't using them.
>>>
>>> Certainly an installation that *is* using 'em would want a higher
>>> setting.
>>
>> Yeah, given the amount of memory per xact, I guess we can't
>> actually set the
>> default higher. I just hate to see a setting that is liable to
>> bite someone
>> on the tuchas so easily.
>
> They will see the failure at 5 faster and adjust it accordingly.
> If it
> was higher they might hit the limit only under heavy load and it would
> surprise them.

Actually, the amount of memory is a reason to default to 0, or change
the name, or put a big comment in the config, because I very often
saw databases where people had set this to a very high value under
the impression that it impacted prepared statements.
--
Decibel!, aka Jim C. Nasby, Database Architect decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian G. Pflug 2007-10-18 16:03:56 Re: Why copy_relation_data only use wal whenWALarchivingis enabled
Previous Message D'Arcy J.M. Cain 2007-10-18 15:53:23 Re: Can a C function(server program) be a UDP or TCP server?