Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Patches > Re: [COMMITTERS...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 3673 of 3877
Post > Topic >>

Re: [COMMITTERS] pgsql: Sigh ...

by andrew@[EMAIL PROTECTED] (Andrew Dunstan) May 2, 2008 at 06:18 PM

This is a MIME-formatted message.  If you see this text it means that your
E-mail software does not sup****t MIME-formatted messages.

--=_alexis.jtlnet.com-20940-1209766666-0001-2
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 7bit



Tom Lane wrote:
>> However, all the values are hardcoded, so nothing in it should relate
to 
>> settings that come from configure, I believe. These should be dealt
with 
>> in src/tools/msvc/Solution.pm (mostly in GenerateFiles() ).
>>     
>
> FYI, I'm about to commit changes moving XLOG_BLCKSZ and XLOG_SEG_SIZE
> into the domain of configurable stuff, too.
>
> 			
>   

This patch should fix things for both sets of changes. And it 
demonstrates pretty much what you need to do for config options for MSVC.

If there's no objection I will apply shortly.

cheers

andrew

--=_alexis.jtlnet.com-20940-1209766666-0001-2
Content-Type: text/x-patch; name="mscvfix.patch"; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mscvfix.patch"

Index: src/include/pg_config.h.win32
===================================================================
RCS file: /cvsroot/pgsql/src/include/pg_config.h.win32,v
retrieving revision 1.54
diff -c -r1.54 pg_config.h.win32
*** src/include/pg_config.h.win32	2 May 2008 03:41:46 -0000	1.54
--- src/include/pg_config.h.win32	2 May 2008 22:04:37 -0000
***************
*** 37,51 ****
  /* The alignment requirement of a `short'. */
  #define ALIGNOF_SHORT 2
  
- /* Size of a disk block --- this also limits the size of a tuple. You
can set
-    it bigger if you need bigger tuples (although TOAST should reduce the
need
-    to have large tuples, since fields can be spread across multiple
tuples).
-    BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ is
-    currently 2^15 (32768). This is determined by the 15-bit widths of
the
-    lp_off and lp_len fields in ItemIdData (see
include/storage/itemid.h).
-    Changing BLCKSZ requires an initdb. */
- #define BLCKSZ 8192
- 
  /* Define to the default TCP ****t number on which the server listens and
to
     which clients will try to connect. This can be overridden at
run-time, but
     it's convenient if your clients have the right default compiled in.
--- 37,42 ----
***************
*** 600,618 ****
     your system. */
  /* #undef PTHREAD_CREATE_JOINABLE */
  
- /* RELSEG_SIZE is the maximum number of blocks allowed in one disk file.
Thus,
-    the maximum size of a single file is RELSEG_SIZE * BLCKSZ; relations
bigger
-    than that are divided into multiple files. RELSEG_SIZE * BLCKSZ must
be
-    less than your OS' limit on file size. This is often 2 GB or 4GB in a
-    32-bit operating system, unless you have large file sup****t enabled.
By
-    default, we make the limit 1 GB to avoid any possible
integer-overflow
-    problems within the OS. A limit smaller than necessary only means we
divide
-    a large relation into more chunks than necessary, so it seems best to
err
-    in the direction of a small limit. A power-of-2 value is recommended
to
-    save a few cycles in md.c, but is not absolutely required. Changing
-    RELSEG_SIZE requires an initdb. */
- #define RELSEG_SIZE 131072
- 
  /* The size of a `size_t', as computed by sizeof. */
  #define SIZEOF_SIZE_T 4
  
--- 591,596 ----
Index: src/tools/msvc/Solution.pm
===================================================================
RCS file: /cvsroot/pgsql/src/tools/msvc/Solution.pm,v
retrieving revision 1.40
diff -c -r1.40 Solution.pm
*** src/tools/msvc/Solution.pm	21 Apr 2008 18:37:28 -0000	1.40
--- src/tools/msvc/Solution.pm	2 May 2008 22:04:39 -0000
***************
*** 34,39 ****
--- 34,56 ----
              die "XML requires both XSLT and ICONV\n";
          }
      }
+ 	$options->{blocksize} = 8
+ 		unless $options->{blocksize}; # undef or 0 means default
+ 	die "Bad blocksize $options->{blocksize}"
+ 		unless grep {$_ == $options->{blocksize}} (1,2,4,8,16,32);
+ 	$options->{segsize} = 1
+ 		unless $options->{segsize}; # undef or 0 means default
+ 	# only allow segsize 1 for now, as we can't do large files yet in
windows
+ 	die "Bad segsize $options->{segsize}"
+ 		unless $options->{segsize} == 1;
+ 	$options->{wal_blocksize} = 8
+ 		unless $options->{wal_blocksize}; # undef or 0 means default
+ 	die "Bad wal_blocksize $options->{wal_blocksize}"
+ 		unless grep {$_ == $options->{wal_blocksize}} (1,2,4,8,16,32,64);
+ 	$options->{wal_segsize} = 16
+ 		unless $options->{wal_segsize}; # undef or 0 means default
+ 	die "Bad wal_segsize $options->{wal_segsize}"
+ 		unless grep {$_ == $options->{wal_segsize}} (1,2,4,8,16,32,64);
      return $self;
  }
  
***************
*** 116,122 ****
          print O "#define USE_LDAP 1\n" if ($self->{options}->{ldap});
          print O "#define HAVE_LIBZ 1\n" if ($self->{options}->{zlib});
          print O "#define USE_SSL 1\n" if ($self->{options}->{openssl});
!         print O "#define ENABLE_NLS 1\n" if ($self->{options}->{nls});
          
          if ($self->{options}->{float4byval}) 
          {
--- 133,148 ----
          print O "#define USE_LDAP 1\n" if ($self->{options}->{ldap});
          print O "#define HAVE_LIBZ 1\n" if ($self->{options}->{zlib});
          print O "#define USE_SSL 1\n" if ($self->{options}->{openssl});
! 		print O "#define ENABLE_NLS 1\n" if ($self->{options}->{nls});
! 
! 		print O "#define BLCKSZ ",1024 * $self->{options}->{blocksize},"\n";
! 		print O "#define RELSEG_SIZE ",
! 			(1024 / $self->{options}->{blocksize}) * 
! 				$self->{options}->{segsize} * 1024, "\n";
! 		print O "#define XLOG_BLCKSZ ",
! 			1024 * $self->{options}->{wal_blocksize},"\n";
! 		print O "#define XLOG_SEG_SIZE (",
! 			$self->{options}->{wal_segsize}," * 1024 * 1024)\n";
          
          if ($self->{options}->{float4byval}) 
          {
Index: src/tools/msvc/config.pl
===================================================================
RCS file: /cvsroot/pgsql/src/tools/msvc/config.pl,v
retrieving revision 1.12
diff -c -r1.12 config.pl
*** src/tools/msvc/config.pl	21 Apr 2008 10:01:32 -0000	1.12
--- src/tools/msvc/config.pl	2 May 2008 22:04:39 -0000
***************
*** 7,12 ****
--- 7,15 ----
      # integer_datetimes=>1,   # --enable-integer-datetimes - on is now
default
      # float4byval=>1,         # --disable-float4-byval, on by default
      # float8byval=>0,         # --disable-float8-byval, off by default
+     # blocksize => 8,         # --with-blocksize, 8kB by default
+     # wal_blocksize => 8,     # --with-wal-blocksize, 8kb by default
+     # wal_segsize => 16,      # --with-wal-segsize, 16MB by default
      nls=>undef,				# --enable-nls=<path>
      tcl=>'c:\tcl',		# --with-tls=<path>
      perl=>'c:\perl', 			# --with-perl

--=_alexis.jtlnet.com-20940-1209766666-0001-2
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


-- 
Sent via pgsql-patches mailing list (pgsql-patches@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

--=_alexis.jtlnet.com-20940-1209766666-0001-2--
 




 9 Posts in Topic:
Re: [COMMITTERS] pgsql: Sigh ...
andrew@[EMAIL PROTECTED]   2008-05-02 18:18:29 
Re: [COMMITTERS] pgsql: Sigh ...
tgl@[EMAIL PROTECTED] (T  2008-05-02 18:28:41 
Re: [COMMITTERS] pgsql: Sigh ...
tgl@[EMAIL PROTECTED] (T  2008-05-02 19:23:34 
Re: [COMMITTERS] pgsql: Sigh ...
andrew@[EMAIL PROTECTED]   2008-05-02 20:26:29 
Re: [COMMITTERS] pgsql: Sigh ...
andrew@[EMAIL PROTECTED]   2008-05-02 19:05:05 
Re: [COMMITTERS] pgsql: Sigh ...
peter_e@[EMAIL PROTECTED]  2008-05-03 11:15:01 
Re: [COMMITTERS] pgsql: Sigh ...
andrew@[EMAIL PROTECTED]   2008-05-03 09:11:26 
Re: [COMMITTERS] pgsql: Sigh ...
tgl@[EMAIL PROTECTED] (T  2008-05-03 13:17:34 
Re: [COMMITTERS] pgsql: Sigh ...
magnus@[EMAIL PROTECTED]   2008-05-03 21:20:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Wed Jul 9 0:01:12 CDT 2008.