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

Commit0892ecb

Browse files
committed
Add a GUC to report whether data page checksums are enabled.
Bernd Helmle
1 parentcdeb79a commit0892ecb

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

‎doc/src/sgml/config.sgml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6169,6 +6169,19 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir'
61696169
</listitem>
61706170
</varlistentry>
61716171

6172+
<varlistentry id="guc-data-checksums" xreflabel="data_checksums">
6173+
<term><varname>data_checksums</varname> (<type>boolean</type>)</term>
6174+
<indexterm>
6175+
<primary><varname>data_checksums</> configuration parameter</primary>
6176+
</indexterm>
6177+
<listitem>
6178+
<para>
6179+
Reports whether data checksums are enabled for this cluster.
6180+
See <xref linkend="app-initdb-data-checksums"> for more information.
6181+
</para>
6182+
</listitem>
6183+
</varlistentry>
6184+
61726185
<varlistentry id="guc-integer-datetimes" xreflabel="integer_datetimes">
61736186
<term><varname>integer_datetimes</varname> (<type>boolean</type>)</term>
61746187
<indexterm>

‎src/backend/access/transam/xlog.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4844,6 +4844,10 @@ ReadControlFile(void)
48444844
" but the server was compiled without USE_FLOAT8_BYVAL."),
48454845
errhint("It looks like you need to recompile or initdb.")));
48464846
#endif
4847+
4848+
/* Make the fixed settings visible as GUC variables, too */
4849+
SetConfigOption("data_checksums",DataChecksumsEnabled() ?"yes" :"no",
4850+
PGC_INTERNAL,PGC_S_OVERRIDE);
48474851
}
48484852

48494853
void

‎src/backend/utils/misc/guc.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ static intmax_identifier_length;
466466
staticintblock_size;
467467
staticintsegment_size;
468468
staticintwal_block_size;
469+
staticbooldata_checksums;
469470
staticintwal_segment_size;
470471
staticboolinteger_datetimes;
471472
staticinteffective_io_concurrency;
@@ -1457,6 +1458,17 @@ static struct config_bool ConfigureNamesBool[] =
14571458
NULL,NULL,NULL
14581459
},
14591460

1461+
{
1462+
{"data_checksums",PGC_INTERNAL,PRESET_OPTIONS,
1463+
gettext_noop("Shows whether data checksums are turned on for this cluster"),
1464+
NULL,
1465+
GUC_NOT_IN_SAMPLE |GUC_DISALLOW_IN_FILE
1466+
},
1467+
&data_checksums,
1468+
false,
1469+
NULL,NULL,NULL
1470+
},
1471+
14601472
/* End-of-list marker */
14611473
{
14621474
{NULL,0,0,NULL,NULL},NULL, false,NULL,NULL,NULL

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp