-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PG-1093 Add dedicated test cases for tde_heap and tde_heap_basic
- Loading branch information
1 parent
622cc30
commit 5e8c728
Showing
6 changed files
with
64 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
\set tde_am tde_heap_basic | ||
\i sql/subtransaction.inc | ||
CREATE EXTENSION pg_tde; | ||
SELECT pg_tde_add_key_provider_file('file-vault','/tmp/pg_tde_test_keyring.per'); | ||
pg_tde_add_key_provider_file | ||
------------------------------ | ||
1 | ||
(1 row) | ||
|
||
SELECT pg_tde_set_principal_key('test-db-principal-key','file-vault'); | ||
pg_tde_set_principal_key | ||
-------------------------- | ||
t | ||
(1 row) | ||
|
||
BEGIN; -- Nesting level 1 | ||
SAVEPOINT sp; | ||
CREATE TABLE foo(s TEXT); -- Nesting level 2 | ||
RELEASE SAVEPOINT sp; | ||
SAVEPOINT sp; | ||
CREATE TABLE bar(s TEXT); -- Nesting level 2 | ||
ROLLBACK TO sp; -- Rollback should not affect first subtransaction | ||
COMMIT; | ||
BEGIN; -- Nesting level 1 | ||
SAVEPOINT sp; | ||
DROP TABLE foo; -- Nesting level 2 | ||
RELEASE SAVEPOINT sp; | ||
SAVEPOINT sp; | ||
CREATE TABLE bar(s TEXT); -- Nesting level 2 | ||
ROLLBACK TO sp; -- Rollback should not affect first subtransaction | ||
COMMIT; | ||
DROP EXTENSION pg_tde; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
CREATE EXTENSION pg_tde; | ||
|
||
SELECT pg_tde_add_key_provider_file('file-vault','/tmp/pg_tde_test_keyring.per'); | ||
SELECT pg_tde_set_principal_key('test-db-principal-key','file-vault'); | ||
|
||
|
||
BEGIN; -- Nesting level 1 | ||
SAVEPOINT sp; | ||
CREATE TABLE foo(s TEXT); -- Nesting level 2 | ||
RELEASE SAVEPOINT sp; | ||
SAVEPOINT sp; | ||
CREATE TABLE bar(s TEXT); -- Nesting level 2 | ||
ROLLBACK TO sp; -- Rollback should not affect first subtransaction | ||
COMMIT; | ||
|
||
BEGIN; -- Nesting level 1 | ||
SAVEPOINT sp; | ||
DROP TABLE foo; -- Nesting level 2 | ||
RELEASE SAVEPOINT sp; | ||
SAVEPOINT sp; | ||
CREATE TABLE bar(s TEXT); -- Nesting level 2 | ||
ROLLBACK TO sp; -- Rollback should not affect first subtransaction | ||
COMMIT; | ||
|
||
DROP EXTENSION pg_tde; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,2 @@ | ||
CREATE EXTENSION pg_tde; | ||
|
||
SELECT pg_tde_add_key_provider_file('file-vault','/tmp/pg_tde_test_keyring.per'); | ||
SELECT pg_tde_set_principal_key('test-db-principal-key','file-vault'); | ||
|
||
|
||
BEGIN; -- Nesting level 1 | ||
SAVEPOINT sp; | ||
CREATE TABLE foo(s TEXT); -- Nesting level 2 | ||
RELEASE SAVEPOINT sp; | ||
SAVEPOINT sp; | ||
CREATE TABLE bar(s TEXT); -- Nesting level 2 | ||
ROLLBACK TO sp; -- Rollback should not affect first subtransaction | ||
COMMIT; | ||
|
||
BEGIN; -- Nesting level 1 | ||
SAVEPOINT sp; | ||
DROP TABLE foo; -- Nesting level 2 | ||
RELEASE SAVEPOINT sp; | ||
SAVEPOINT sp; | ||
CREATE TABLE bar(s TEXT); -- Nesting level 2 | ||
ROLLBACK TO sp; -- Rollback should not affect first subtransaction | ||
COMMIT; | ||
|
||
DROP EXTENSION pg_tde; | ||
\set tde_am tde_heap | ||
\i sql/subtransaction.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
\set tde_am tde_heap_basic | ||
\i sql/subtransaction.inc |