1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

Further post-revert cleanup after online checksums

When reverting I had missed updating the documentation for tracking data
checksum failures and the checksum version in the REDO record.  The test-
code for enabling and disabling checksums offline was originally kept to
minimize backpatching conflicts, but the amount of testcode backpatching
doesn't really warrant keeping dead code.

Since no version has been shipped since bumping XLOG_PAGE_MAGIC it is
left at the previous bump version.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
Reported-by: Manuel Reyes Bravo <manuelreyesbravo@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwFLNCA9nVHSsC_=G_mvsK_fAFb+QbJAL7=R9cK2PL9ZBQ@mail.gmail.com
This commit is contained in:
Daniel Gustafsson
2026-09-17 23:04:04 +02:00
parent 0f433a6b35
commit 6b0760a10a
3 changed files with 5 additions and 47 deletions

View File

@@ -3902,14 +3902,9 @@ description | Waiting for a newly initialized WAL file to reach durable storage
</para>
<para>
Number of data page checksum failures detected in this
database (or on a shared object). Detected failures are not reset if
the <xref linkend="guc-data-checksums"/> setting changes. Clusters
which are initialized without data checksums will show this as
<literal>0</literal>. In <productname>PostgreSQL</productname> version
18 and earlier, this was set to <literal>NULL</literal> for clusters
with data checksums disabled.
</para>
</entry>
database (or on a shared object), or NULL if data checksums are
disabled.
</para></entry>
</row>
<row>
@@ -3918,8 +3913,8 @@ description | Waiting for a newly initialized WAL file to reach durable storage
</para>
<para>
Time at which the last data page checksum failure was detected in
this database (or on a shared object). Last failure is reported
regardless of the <xref linkend="guc-data-checksums"/> setting.
this database (or on a shared object), or NULL if data checksums are
disabled.
</para></entry>
</row>

View File

@@ -308,7 +308,6 @@ typedef struct xl_end_of_recovery
typedef struct xl_checkpoint_redo
{
int wal_level;
uint32 data_checksum_version;
} xl_checkpoint_redo;
/*

View File

@@ -3992,42 +3992,6 @@ sub advance_wal
}
}
=item $node->checksum_enable_offline()
Enable data page checksums in an offline cluster with B<pg_checksums>. The
caller is responsible for ensuring that the cluster is in the right state for
this operation.
=cut
sub checksum_enable_offline
{
my ($self) = @_;
print "# Enabling checksums in \"$self->data_dir\"\n";
PostgreSQL::Test::Utils::system_or_bail('pg_checksums', '-D',
$self->data_dir, '-e');
return;
}
=item $node->checksum_disable_offline()
Disable data page checksums in an offline cluster with B<pg_checksums>. The
caller is responsible for ensuring that the cluster is in the right state for
this operation.
=cut
sub checksum_disable_offline
{
my ($self) = @_;
print "# Disabling checksums in \"$self->data_dir\"\n";
PostgreSQL::Test::Utils::system_or_bail('pg_checksums', '-D',
$self->data_dir, '-d');
return;
}
=pod
=back