--==========8EDD2055B148CD3922C9==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--On Montag, Juni 30, 2008 18:47:33 -0400 Bruce Momjian <bruce@[EMAIL PROTECTED]
>
wrote:
>>
>> I'd like to implement them if we agree on them
>
> Bernd, have you made any progress on this?
Here's a patch for this. I'll add it to the commit fest wiki page if it's
okay for you.
--
Thanks
Bernd
--==========8EDD2055B148CD3922C9==========
Content-Type: text/x-diff; charset=utf-8; name="add_gucs.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="add_gucs.patch"; size=4293
*** a/doc/src/sgml/config.sgml
--- b/doc/src/sgml/config.sgml
***************
*** 4759,4764 **** dynamic_library_path =3D
'C:\tools\postgresql;H:\my_proj=
ect\lib;$libdir'
--- 4759,4807 ----
</listitem>
</varlistentry>
=20=20
+ <varlistentry id=3D"guc-segment-size" xreflabel=3D"segment_size">
+ <term><varname>segment_size</varname>
(<type>integer</type>)</term>
+ <indexterm>
+ <primary><varname>segment_size</> configuration
parameter</primary>
+ </indexterm>
+ <listitem>
+ <para>
+ Re****ts the number of pages which can be stored within a file
seg=
ment.=20=20
+ The total physical size of a segment file in bytes can be
determi=
ned by multiplying
+ the <varname>block_size</varname> parameter with
<varname>segment=
_size</varname>.
+ </para>
+ </listitem>
+ </varlistentry>
+=20
+ <varlistentry id=3D"guc-wal-block-size"
xreflabel=3D"wal_block_size">
+ <term><varname>wal_block_size</varname>
(<type>integer</type>)</ter=
m>
+ <indexterm>
+ <primary><varname>wal_block_size</> configuration
parameter</prima=
ry>
+ </indexterm>
+ <listitem>
+ <para>
+ Re****ts the size of a write ahead log disk block. It is
determin=
ed by the value
+ of <literal>XLOG_BLCKSZ</> when building the server. The default
+ value is 8192 bytes. <varname>wal_block_size</varname>
influences=
the total physical
+ size of a write ahead log segment. See <xref
+ linkend=3D"guc-wal-segment-size"> for more information.
+ </para>
+ </listitem>
+ </varlistentry>
+=20
+ <varlistentry id=3D"guc-wal-segment-size"
xreflabel=3D"wal_segment_s=
ize">
+ <term><varname>wal_segment_size</varname>
(<type>integer</type>)</t=
erm>
+ <indexterm>
+ <primary><varname>wal_segment_size</> configuration
parameter</pri=
mary>
+ </indexterm>
+ <listitem>
+ <para>
+ Re****ts the number of pages within a write ahead log segment
file=
.. <varname>wal_segment_size</varname> multiplied with
<varname>wal_block_si=
ze</varname> gives the total physical size of a write ahead
+ log segment file in bytes.
+ </para>
+ </listitem>
+ </varlistentry>
+=20
<varlistentry id=3D"guc-integer-datetimes"
xreflabel=3D"integer_date=
times">
<term><varname>integer_datetimes</varname>
(<type>boolean</type>)</=
term>
<indexterm>
*** a/src/backend/utils/misc/guc.c
--- b/src/backend/utils/misc/guc.c
***************
*** 29,34 ****
--- 29,35 ----
#include "access/transam.h"
#include "access/twophase.h"
#include "access/xact.h"
+ #include "access/xlog_internal.h"
#include "catalog/namespace.h"
#include "commands/async.h"
#include "commands/prepare.h"
***************
*** 355,360 **** static int max_function_args;
--- 356,364 ----
static int max_index_keys;
static int max_identifier_length;
static int block_size;
+ static int segment_size;
+ static int wal_block_size;
+ static int wal_segment_size;
static bool integer_datetimes;
=20=20
/* should be static, but commands/variable.c needs to get at these */
***************
*** 1731,1736 **** static struct config_int ConfigureNamesInt[] =3D
--- 1735,1774 ----
},
=20=20
{
+ {"segment_size", PGC_INTERNAL, PRESET_OPTIONS,
+ gettext_noop("Shows the number of pages per disk file."),
+ NULL,
+ GUC_UNIT_BLOCKS | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
+ },
+ &segment_size,
+ RELSEG_SIZE,
+ RELSEG_SIZE,
+ RELSEG_SIZE, NULL, NULL
+ },
+=20
+ {
+ {"wal_block_size", PGC_INTERNAL, PRESET_OPTIONS,
+ gettext_noop("Shows the write ahead log block size."),
+ NULL,
+ GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
+ },
+ &wal_block_size,
+ XLOG_BLCKSZ, XLOG_BLCKSZ, XLOG_BLCKSZ, NULL, NULL
+ },
+=20
+ {
+ {"wal_segment_size", PGC_INTERNAL, PRESET_OPTIONS,
+ gettext_noop("Shows the number of pages per write ahead log
segment."),
+ NULL,
+ GUC_UNIT_XBLOCKS | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
+ },
+ &wal_segment_size,
+ (XLOG_SEG_SIZE / XLOG_BLCKSZ),=20
+ (XLOG_SEG_SIZE / XLOG_BLCKSZ),=20
+ (XLOG_SEG_SIZE / XLOG_BLCKSZ), NULL, NULL
+ },
+=20
+ {
{"autovacuum_naptime", PGC_SIGHUP, AUTOVACUUM,
gettext_noop("Time to sleep between autovacuum runs."),
NULL,
--==========8EDD2055B148CD3922C9==========
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0
--
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
--==========8EDD2055B148CD3922C9==========--


|