mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
Revert "Allow on-line enabling and disabling of data checksums"
This reverts the backend sides of commit 1fde38beaa
.
I have, at least for now, left the pg_verify_checksums tool in place, as
this tool can be very valuable without the rest of the patch as well,
and since it's a read-only tool that only runs when the cluster is down
it should be a lot safer.
This commit is contained in:
@ -32,7 +32,6 @@
|
||||
#include "access/transam.h"
|
||||
#include "access/twophase.h"
|
||||
#include "access/xact.h"
|
||||
#include "access/xlog.h"
|
||||
#include "access/xlog_internal.h"
|
||||
#include "catalog/namespace.h"
|
||||
#include "catalog/pg_authid.h"
|
||||
@ -69,7 +68,6 @@
|
||||
#include "replication/walreceiver.h"
|
||||
#include "replication/walsender.h"
|
||||
#include "storage/bufmgr.h"
|
||||
#include "storage/checksum.h"
|
||||
#include "storage/dsm_impl.h"
|
||||
#include "storage/standby.h"
|
||||
#include "storage/fd.h"
|
||||
@ -422,17 +420,6 @@ static const struct config_enum_entry password_encryption_options[] = {
|
||||
{NULL, 0, false}
|
||||
};
|
||||
|
||||
/*
|
||||
* data_checksum used to be a boolean, but was only set by initdb so there is
|
||||
* no need to support variants of boolean input.
|
||||
*/
|
||||
static const struct config_enum_entry data_checksum_options[] = {
|
||||
{"on", DATA_CHECKSUMS_ON, true},
|
||||
{"off", DATA_CHECKSUMS_OFF, true},
|
||||
{"inprogress", DATA_CHECKSUMS_INPROGRESS, true},
|
||||
{NULL, 0, false}
|
||||
};
|
||||
|
||||
/*
|
||||
* Options for enum values stored in other modules
|
||||
*/
|
||||
@ -528,7 +515,7 @@ static int max_identifier_length;
|
||||
static int block_size;
|
||||
static int segment_size;
|
||||
static int wal_block_size;
|
||||
static int data_checksums_tmp; /* only accessed locally! */
|
||||
static bool data_checksums;
|
||||
static bool integer_datetimes;
|
||||
static bool assert_enabled;
|
||||
|
||||
@ -1697,6 +1684,17 @@ static struct config_bool ConfigureNamesBool[] =
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"data_checksums", PGC_INTERNAL, PRESET_OPTIONS,
|
||||
gettext_noop("Shows whether data checksums are turned on for this cluster."),
|
||||
NULL,
|
||||
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
|
||||
},
|
||||
&data_checksums,
|
||||
false,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"syslog_sequence_numbers", PGC_SIGHUP, LOGGING_WHERE,
|
||||
gettext_noop("Add sequence number to syslog messages to avoid duplicate suppression."),
|
||||
@ -4129,17 +4127,6 @@ static struct config_enum ConfigureNamesEnum[] =
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"data_checksums", PGC_INTERNAL, PRESET_OPTIONS,
|
||||
gettext_noop("Shows whether data checksums are turned on for this cluster."),
|
||||
NULL,
|
||||
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
|
||||
},
|
||||
&data_checksums_tmp,
|
||||
DATA_CHECKSUMS_OFF, data_checksum_options,
|
||||
NULL, NULL, show_data_checksums
|
||||
},
|
||||
|
||||
/* End-of-list marker */
|
||||
{
|
||||
{NULL, 0, 0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL
|
||||
|
Reference in New Issue
Block a user