|
|
@ -69,16 +69,11 @@ mkdir $datadir; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# Control file should tell that data checksums are disabled by default. |
|
|
|
# Control file should tell that data checksums are enabled by default. |
|
|
|
command_like( |
|
|
|
command_like( |
|
|
|
[ 'pg_controldata', $datadir ], |
|
|
|
[ 'pg_controldata', $datadir ], |
|
|
|
qr/Data page checksum version:.*0/, |
|
|
|
qr/Data page checksum version:.*1/, |
|
|
|
'checksums are disabled in control file'); |
|
|
|
'checksums are enabled in control file'); |
|
|
|
# pg_checksums fails with checksums disabled by default. This is |
|
|
|
|
|
|
|
# not part of the tests included in pg_checksums to save from |
|
|
|
|
|
|
|
# the creation of an extra instance. |
|
|
|
|
|
|
|
command_fails([ 'pg_checksums', '-D', $datadir ], |
|
|
|
|
|
|
|
"pg_checksums fails with data checksum disabled"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
command_ok([ 'initdb', '-S', $datadir ], 'sync only'); |
|
|
|
command_ok([ 'initdb', '-S', $datadir ], 'sync only'); |
|
|
|
command_fails([ 'initdb', $datadir ], 'existing data directory'); |
|
|
|
command_fails([ 'initdb', $datadir ], 'existing data directory'); |
|
|
@ -280,4 +275,11 @@ command_like( |
|
|
|
qr/Data page checksum version:.*0/, |
|
|
|
qr/Data page checksum version:.*0/, |
|
|
|
'checksums are disabled in control file'); |
|
|
|
'checksums are disabled in control file'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# pg_checksums fails with checksums disabled. This is |
|
|
|
|
|
|
|
# not part of the tests included in pg_checksums to save from |
|
|
|
|
|
|
|
# the creation of an extra instance. |
|
|
|
|
|
|
|
command_fails( |
|
|
|
|
|
|
|
[ 'pg_checksums', '-D', $datadir_nochecksums ], |
|
|
|
|
|
|
|
"pg_checksums fails with data checksum disabled"); |
|
|
|
|
|
|
|
|
|
|
|
done_testing(); |
|
|
|
done_testing(); |
|
|
|