Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit272b6ef

Browse files
committed
Prevent BLCKSZ < 1024, and have initdb test shared buffers based on the
BLCKSZ value.
1 parent4816b0f commit272b6ef

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* Portions Copyright (c) 1994, Regents of the University of California
4343
* Portions taken from FreeBSD.
4444
*
45-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.133 2007/02/16 02:10:07 alvherre Exp $
45+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.134 2007/02/20 23:49:38 momjian Exp $
4646
*
4747
*-------------------------------------------------------------------------
4848
*/
@@ -1208,7 +1208,8 @@ test_config_settings(void)
12081208

12091209
for (i=0;i<bufslen;i++)
12101210
{
1211-
test_buffs=trial_bufs[i];
1211+
/* Use same amount of memory, independent of BLCKSZ */
1212+
test_buffs= (trial_bufs[i]*8192) /BLCKSZ;
12121213
if (test_buffs <=ok_buffers)
12131214
{
12141215
test_buffs=ok_buffers;

‎src/include/pg_config_manual.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* for developers.If you edit any of these, be sure to do a *full*
77
* rebuild (and an initdb if noted).
88
*
9-
* $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.24 2007/02/06 09:16:08 petere Exp $
9+
* $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.25 2007/02/20 23:49:38 momjian Exp $
1010
*------------------------------------------------------------------------
1111
*/
1212

@@ -25,6 +25,10 @@
2525
*/
2626
#defineBLCKSZ8192
2727

28+
#ifBLCKSZ<1024
29+
#error BLCKSZ must be >= 1024
30+
#endif
31+
2832
/*
2933
* RELSEG_SIZE is the maximum number of blocks allowed in one disk
3034
* file. Thus, the maximum size of a single file is RELSEG_SIZE *

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp