diff --git a/ci_scripts/env.sh b/ci_scripts/env.sh index ec1cff4f8f2a1..11cf83eeed38e 100644 --- a/ci_scripts/env.sh +++ b/ci_scripts/env.sh @@ -1,3 +1,3 @@ #!/bin/bash -export PERCONA_SERVER_VERSION=17.5.2 +export PERCONA_SERVER_VERSION=17.5.3 diff --git a/configure b/configure index 7960612b26b5c..542e748217370 100755 --- a/configure +++ b/configure @@ -2856,7 +2856,7 @@ cat >>confdefs.h <<_ACEOF _ACEOF -PG_PERCONAVERSION=2 +PG_PERCONAVERSION=3 cat >>confdefs.h <<_ACEOF #define PG_PERCONAVERSION "$PG_PERCONAVERSION" diff --git a/configure.ac b/configure.ac index 70fa3619d4bad..d3f805585017a 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,7 @@ AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major versio AC_DEFINE_UNQUOTED(PG_MAJORVERSION_NUM, $PG_MAJORVERSION, [PostgreSQL major version number]) AC_DEFINE_UNQUOTED(PG_MINORVERSION_NUM, $PG_MINORVERSION, [PostgreSQL minor version number]) -[PG_PERCONAVERSION=2] +[PG_PERCONAVERSION=3] AC_DEFINE_UNQUOTED(PG_PERCONAVERSION, "$PG_PERCONAVERSION", [PostgreSQL Percona version as a string]) PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version], diff --git a/contrib/pg_tde/Makefile b/contrib/pg_tde/Makefile index 25726c461125e..f691f3d400302 100644 --- a/contrib/pg_tde/Makefile +++ b/contrib/pg_tde/Makefile @@ -1,7 +1,7 @@ PGFILEDESC = "pg_tde access method" MODULE_big = pg_tde EXTENSION = pg_tde -DATA = pg_tde--1.0.sql +DATA = pg_tde--1.0--2.0.sql pg_tde--1.0.sql # Since meson supports skipping test suites this is a make only feature ifndef TDE_MODE diff --git a/contrib/pg_tde/expected/version.out b/contrib/pg_tde/expected/version.out index 44ebea8d04d32..54e00d133bf6a 100644 --- a/contrib/pg_tde/expected/version.out +++ b/contrib/pg_tde/expected/version.out @@ -2,7 +2,7 @@ CREATE EXTENSION pg_tde; SELECT pg_tde_version(); pg_tde_version ---------------- - pg_tde 1.0.0 + pg_tde 2.0.0 (1 row) DROP EXTENSION pg_tde; diff --git a/contrib/pg_tde/meson.build b/contrib/pg_tde/meson.build index 0494fda2796e5..0899f2ebb618f 100644 --- a/contrib/pg_tde/meson.build +++ b/contrib/pg_tde/meson.build @@ -78,6 +78,7 @@ endif install_data( 'pg_tde.control', 'pg_tde--1.0.sql', + 'pg_tde--1.0--2.0.sql', kwargs: contrib_data_args, ) diff --git a/contrib/pg_tde/pg_tde--1.0--2.0.sql b/contrib/pg_tde/pg_tde--1.0--2.0.sql new file mode 100644 index 0000000000000..04d243f79afc2 --- /dev/null +++ b/contrib/pg_tde/pg_tde--1.0--2.0.sql @@ -0,0 +1,4 @@ +-- complain if script is sourced in psql, rather than via CREATE EXTENSION +\echo Use "ALTER EXTENSION pg_tde UPDATE TO '2.0'" to load this file. \quit + +-- This file is a dummy, because no SQL changed between 1.0 and 2.0 diff --git a/contrib/pg_tde/pg_tde.control b/contrib/pg_tde/pg_tde.control index 9ea82992d7490..5496ed190ecc4 100644 --- a/contrib/pg_tde/pg_tde.control +++ b/contrib/pg_tde/pg_tde.control @@ -1,4 +1,4 @@ comment = 'pg_tde access method' -default_version = '1.0' +default_version = '2.0' module_pathname = '$libdir/pg_tde' relocatable = false diff --git a/contrib/pg_tde/src/include/pg_tde.h b/contrib/pg_tde/src/include/pg_tde.h index 4b6bb94d6d8f4..46e622d26a91c 100644 --- a/contrib/pg_tde/src/include/pg_tde.h +++ b/contrib/pg_tde/src/include/pg_tde.h @@ -2,7 +2,7 @@ #define PG_TDE_H #define PG_TDE_NAME "pg_tde" -#define PG_TDE_VERSION "1.0.0" +#define PG_TDE_VERSION "2.0.0" #define PG_TDE_VERSION_STRING PG_TDE_NAME " " PG_TDE_VERSION #define PG_TDE_DATA_DIR "pg_tde" diff --git a/contrib/pg_tde/t/expected/basic.out b/contrib/pg_tde/t/expected/basic.out index 3947c0988f891..abeba5d06e232 100644 --- a/contrib/pg_tde/t/expected/basic.out +++ b/contrib/pg_tde/t/expected/basic.out @@ -20,7 +20,7 @@ CREATE EXTENSION pg_tde; SELECT extname, extversion FROM pg_extension WHERE extname = 'pg_tde'; extname | extversion ---------+------------ - pg_tde | 1.0 + pg_tde | 2.0 (1 row) CREATE TABLE test_enc (id SERIAL, k INTEGER, PRIMARY KEY (id)) USING tde_heap; diff --git a/meson.build b/meson.build index c054200660486..8ea9d294a00ec 100644 --- a/meson.build +++ b/meson.build @@ -134,7 +134,7 @@ endif pg_version_major = pg_version_arr[0].to_int() pg_version_minor = pg_version_arr[1].to_int() pg_version_num = (pg_version_major * 10000) + pg_version_minor -pg_percona_ver = '2' +pg_percona_ver = '3' pg_url = 'https://www.postgresql.org/' diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl index 403acb6eb4115..e643a7fee533f 100644 --- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl +++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl @@ -10,6 +10,11 @@ use PostgreSQL::Test::Utils; use Test::More; +if (defined($ENV{TDE_MODE})) +{ + plan skip_all => "Slightly edited version of this test avaiable in pg_tde suite"; +} + program_help_ok('pg_basebackup'); program_version_ok('pg_basebackup'); program_options_handling_ok('pg_basebackup'); diff --git a/src/bin/pg_rewind/t/001_basic.pl b/src/bin/pg_rewind/t/001_basic.pl index d2cc4d22f0ed4..aeb92aa4fa300 100644 --- a/src/bin/pg_rewind/t/001_basic.pl +++ b/src/bin/pg_rewind/t/001_basic.pl @@ -11,6 +11,11 @@ use RewindTest; +if (defined($ENV{TDE_MODE})) +{ + plan skip_all => "Slightly edited version of this test avaiable in pg_tde suite"; +} + sub run_test { my $test_mode = shift; diff --git a/src/bin/pg_rewind/t/002_databases.pl b/src/bin/pg_rewind/t/002_databases.pl index 755ea80e332f9..e057523f63a33 100644 --- a/src/bin/pg_rewind/t/002_databases.pl +++ b/src/bin/pg_rewind/t/002_databases.pl @@ -11,6 +11,11 @@ use RewindTest; +if (defined($ENV{TDE_MODE})) +{ + plan skip_all => "Something weird going on with file modes"; +} + sub run_test { my $test_mode = shift; diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl index 0431a7a977c42..78bd776f5be2f 100644 --- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl +++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl @@ -15,11 +15,6 @@ use PostgreSQL::Test::AdjustUpgrade; use Test::More; -if (defined($ENV{TDE_MODE})) -{ - plan skip_all => "Running with TDE doesn't support special server starts yet"; -} - # Can be changed to test the other modes. my $mode = $ENV{PG_TEST_PG_UPGRADE_MODE} || '--copy'; diff --git a/src/test/modules/test_misc/t/008_percona_server_version.pl b/src/test/modules/test_misc/t/008_percona_server_version.pl index 347e173b523ed..8dc0ff0621d8d 100644 --- a/src/test/modules/test_misc/t/008_percona_server_version.pl +++ b/src/test/modules/test_misc/t/008_percona_server_version.pl @@ -17,7 +17,7 @@ # To make this testcase work, PERCONA_SERVER_VERSION variable should be available in environment. # If you are using ci_scripts it is already declated in ci_scripts/env.sh # If you are using command line make for regression then export like: -# export PERCONA_SERVER_VERSION=17.5.2 +# export PERCONA_SERVER_VERSION=17.5.3 if (!defined($ENV{PERCONA_SERVER_VERSION})) { diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm index f2d9afd398fbb..94dfbea455872 100644 --- a/src/test/perl/PostgreSQL/Test/Cluster.pm +++ b/src/test/perl/PostgreSQL/Test/Cluster.pm @@ -115,6 +115,8 @@ use Text::ParseWords qw(shellwords); use Time::HiRes qw(usleep); use Scalar::Util qw(blessed); +use if defined($ENV{TDE_MODE}), 'PostgreSQL::Test::TdeCluster'; + our ($use_tcp, $test_localhost, $test_pghost, $last_host_assigned, $last_port_assigned, @all_nodes, $died, $portdir); @@ -1527,6 +1529,10 @@ sub new } } + if (defined($ENV{TDE_MODE})) { + bless $node, 'PostgreSQL::Test::TdeCluster'; + } + # Add node to list of nodes push(@all_nodes, $node); diff --git a/src/test/perl/PostgreSQL/Test/TdeCluster.pm b/src/test/perl/PostgreSQL/Test/TdeCluster.pm new file mode 100644 index 0000000000000..c0e8046237d61 --- /dev/null +++ b/src/test/perl/PostgreSQL/Test/TdeCluster.pm @@ -0,0 +1,286 @@ +package PostgreSQL::Test::TdeCluster; + +use parent 'PostgreSQL::Test::Cluster'; + +use strict; +use warnings FATAL => 'all'; + +use List::Util (); +use PostgreSQL::Test::RecursiveCopy (); +use PostgreSQL::Test::Utils (); + +sub init +{ + my ($self, %params) = @_; + + $self->SUPER::init(%params); + + $self->SUPER::append_conf('postgresql.conf', 'shared_preload_libraries = pg_tde'); + $self->SUPER::append_conf('postgresql.conf', 'pg_tde.wal_encrypt = on'); + + $self->_setup_keyfile; + + unless (-e $self->pg_tde_dir) + { + mkdir($self->pg_tde_dir); + $self->_setup_default_key; + PostgreSQL::Test::Utils::chmod_recursive($self->pg_tde_dir, 0700, 0600); + } + + PostgreSQL::Test::Utils::run_log([ + 'pg_tde_change_key_provider', + '-D', $self->data_dir, + '1664', + 'global_test_provider', + 'file', + $self->pg_tde_keyfile, + ]); +} + +sub append_conf +{ + my ($self, $filename, $str) = @_; + + if ($filename eq 'postgresql.conf' or $filename eq 'postgresql.auto.conf') + { + # TODO: Will not work with shared_preload_libraries= without any libraries, but no TAP test currently do that. + $str =~ s/shared_preload_libraries *= *'?([^'\n]+)'?/shared_preload_libraries = 'pg_tde,$1'/ + } + + $self->SUPER::append_conf($filename, $str); +} + +sub backup +{ + my ($self, $backup_name, %params) = @_; + my $backup_dir = $self->backup_dir . '/' . $backup_name; + + $params{backup_options} = [] unless defined $params{backup_options}; + + mkdir $backup_dir or die "mkdir($backup_dir) failed: $!"; + + PostgreSQL::Test::RecursiveCopy::copypath($self->pg_tde_dir, $backup_dir . '/pg_tde'); + PostgreSQL::Test::Utils::chmod_recursive($backup_dir . '/pg_tde', 0750, 0640); + + # TODO: Be more thorough in checking for options incompatible with --encrypt-wal + unless (List::Util::any {$_ eq '-Ft' or $_ eq '-Xnone'} @{ $params{backup_options} } ) { + push @{ $params{backup_options} }, '--encrypt-wal'; + } + + $self->SUPER::backup($backup_name, %params); +} + +sub enable_archiving +{ + my ($self) = @_; + my $path = $self->archive_dir; + my $name = $self->name; + + print "### Enabling WAL archiving for node \"$name\"\n"; + + $self->append_conf('postgresql.conf', + "archive_mode = on\n" . + qq(archive_command = 'pg_tde_archive_decrypt %f %p "cp \\"%%p\\" \\"$path/%%f\\""') + ); + + return; +} + +sub enable_restoring +{ + my ($self, $root_node, $standby) = @_; + my $path = $root_node->archive_dir; + my $name = $self->name; + + print "### Enabling WAL restore for node \"$name\"\n"; + + $self->append_conf('postgresql.conf', + qq(restore_command = 'pg_tde_restore_encrypt %f %p "cp \\"$path/%%f\\" \\"%%p\\""') + ); + + if ($standby) + { + $self->set_standby_mode(); + } + else + { + $self->set_recovery_mode(); + } + + return; +} + +sub pg_tde_dir +{ + my ($self) = @_; + return $self->data_dir . '/pg_tde'; +} + +sub pg_tde_keyfile +{ + my ($self) = @_; + return $self->basedir . '/pg_tde_test_keys'; +} + +sub _setup_keyfile +{ + my ($self) = @_; + + $self->_write_binary_file($self->pg_tde_keyfile, $self->_key_provider_file); + +} + +sub _setup_default_key +{ + my ($self, %params) = @_; + + $self->_write_binary_file( + $self->pg_tde_dir . '/1664_providers', + $self->_provider_config_file + ); + chmod(0600, $self->pg_tde_dir . '/1664_providers'); + + $self->_write_binary_file( + $self->pg_tde_dir . '/1663_keys', + $self->_default_key_file + ); + chmod(0600, $self->pg_tde_dir . '/1663_keys'); +} + +sub _write_binary_file +{ + # TODO: We need a better way since this will break if format changes + # and will not work on ARM. + + my ($self, $filename, $data) = @_; + + my $fh; + + open($fh, '>:raw', $filename) or die("could not create \"$filename\""); + $fh->print($data); + close($fh); +} + + +sub _provider_config_file { + "\xff\xff\xff\xff\x67\x6c\x6f\x62\x61\x6c\x5f\x74\x65\x73\x74\x5f" . + "\x70\x72\x6f\x76\x69\x64\x65\x72\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x7b\x22\x70\x61\x74\x68\x22\x3a\x22\x50\x4c\x41" . + "\x43\x45\x48\x4f\x4c\x44\x45\x52\x22\x7d\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x01\x00\x00\x00"; +} + +sub _default_key_file { + "\x54\x44\x45\x03\x71\x61\x00\x00\x7f\x06\x00\x00\xff\xff\xff\xff" . + "\xd0\xdf\x9c\x68\x00\x00\x00\x00\xe6\x7b\x05\x00\x00\x00\x00\x00" . + "\x64\x65\x66\x61\x75\x6c\x74\x5f\x74\x65\x73\x74\x5f\x6b\x65\x79" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x43\xfd\x05\xe2\x94\x23\x1c\xfe\xc1\x20\x7f\x47\xd1\xaa\xeb\xf8" . + "\x46\x12\x9c\x12\x69\x3e\xd0\x9e\x8d\xe1\x0b\x73\x53\xcc\xfa\x3d"; +} + +sub _key_provider_file { + "\x64\x65\x66\x61\x75\x6c\x74\x5f\x74\x65\x73\x74\x5f\x6b\x65\x79" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x3e\xe9\xe6\xc1\x4b\x39\xcd\x2e\x60\x5e\x9e\xf1\xd5\xdf\x93\x50" . + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" . + "\x10\x00\x00\x00"; +} + +1; diff --git a/src/test/recovery/t/027_stream_regress.pl b/src/test/recovery/t/027_stream_regress.pl index 5178466fd0c4f..d1ae32d97d603 100644 --- a/src/test/recovery/t/027_stream_regress.pl +++ b/src/test/recovery/t/027_stream_regress.pl @@ -9,11 +9,6 @@ use Test::More; use File::Basename; -if (defined($ENV{TDE_MODE})) -{ - plan skip_all => "Running with TDE doesn't support special server starts yet"; -} - # Initialize primary node my $node_primary = PostgreSQL::Test::Cluster->new('primary'); $node_primary->init(allows_streaming => 1); diff --git a/src/test/recovery/t/039_end_of_wal.pl b/src/test/recovery/t/039_end_of_wal.pl index eb1e051d43dab..62587177d55a0 100644 --- a/src/test/recovery/t/039_end_of_wal.pl +++ b/src/test/recovery/t/039_end_of_wal.pl @@ -13,6 +13,11 @@ use integer; # causes / operator to use integer math +if (defined($ENV{TDE_MODE})) +{ + plan skip_all => "Uses write_wal to hack wal directly"; +} + # Is this a big-endian system ("network" byte order)? We can't use 'Q' in # pack() calls because it's not available in some perl builds, so we need to # break 64 bit LSN values into two 'I' values. Fortunately we don't need to diff --git a/src/test/recovery/t/042_low_level_backup.pl b/src/test/recovery/t/042_low_level_backup.pl index 61d23187e0f90..768da8c7e78db 100644 --- a/src/test/recovery/t/042_low_level_backup.pl +++ b/src/test/recovery/t/042_low_level_backup.pl @@ -13,6 +13,12 @@ use PostgreSQL::Test::Utils; use Test::More; + +if (defined($ENV{TDE_MODE})) +{ + plan skip_all => "Directly copies archived data without using restore_command"; +} + # Start primary node with archiving. my $node_primary = PostgreSQL::Test::Cluster->new('primary'); $node_primary->init(has_archiving => 1, allows_streaming => 1); diff --git a/src/test/recovery/t/043_no_contrecord_switch.pl b/src/test/recovery/t/043_no_contrecord_switch.pl index a473d3e7d3e63..489b30f9b5cbb 100644 --- a/src/test/recovery/t/043_no_contrecord_switch.pl +++ b/src/test/recovery/t/043_no_contrecord_switch.pl @@ -12,6 +12,11 @@ use integer; # causes / operator to use integer math +if (defined($ENV{TDE_MODE})) +{ + plan skip_all => "Uses write_wal to hack wal directly"; +} + # Values queried from the server my $WAL_SEGMENT_SIZE; my $WAL_BLOCK_SIZE;