Configuring BLCKSZ and XLOGSEGSZ (in 8.3)

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Configuring BLCKSZ and XLOGSEGSZ (in 8.3)
Date: 2006-11-27 11:30:41
Message-ID: 1164627042.3778.142.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

It seems possible to vary both BLCKSZ and XLOGSEGSZ rather than have
them set within pg_config_manual. There are a number of use-cases where
varying these values will offer increased performance (and for many
cases, no difference at all, I accept).

Most of the PostgreSQL user base don't recompile their own versions, let
alone know how to edit the source to change these parameters. Those
people should now have the benefits known and used by a small few.

- BLCKSZ can be set at initdb, so an additional option -Z to allow
setting the value to 4, 8, 16 or 32 KB at that point (default 8 KB).

- XLOGSEGSZ can also be set at initdb, though could also be set using
resetxlog following a clean shutdown. (This would, for example, require
a Warm Standby server to need reconfiguration.)

Both of these changes would require updates to the control file to allow
those aspects to be set prior to the initial write of the control file.
Values would be re-read from the control file on startup.

Some refactoring would be required to make BLCKSZ usable, touching a
number of parts of the code in minor ways. There aren't many cases where
the BLCKSZ is used repeatedly at run time; mostly it is used during
startup of the server or some parts of executor start. So, AFAICS, there
is relatively low overhead from supporting variable BLCKSZ.

The infrastructure to support variable XLOGSEGSZ is already there, so
few changes are required to make this variable.

Comments?

(Sorry for raising so many threads at once; the 8.3 cycle is fairly
short, so I want to get going, now that 8.2 seems almost there)

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2006-11-27 11:40:02 Potential to_char localization bug
Previous Message Simon Riggs 2006-11-27 10:49:39 HugeTLB support (in 8.3)

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2006-11-27 13:01:07 Re: Configuring BLCKSZ and XLOGSEGSZ (in 8.3)
Previous Message Simon Riggs 2006-11-27 09:20:33 Re: [PATCHES] Avg performance for int8/numeric