mirror of https://github.com/postgres/postgres
parent
a5bef05403
commit
bf936b0a10
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,16 @@ |
||||
CREATE EXTENSION pg_tde; |
||||
-- server restart |
||||
CREATE TABLE test_enc(id SERIAL,k VARCHAR(32),PRIMARY KEY (id)) USING tde_heap_basic; |
||||
INSERT INTO test_enc (k) VALUES ('foobar'),('barfoo'); |
||||
SELECT * FROM test_enc ORDER BY id ASC; |
||||
1|foobar |
||||
2|barfoo |
||||
-- server restart |
||||
SELECT * FROM test_enc ORDER BY id ASC; |
||||
1|foobar |
||||
2|barfoo |
||||
TABLEFILE FOUND: yes |
||||
|
||||
CONTAINS FOO (should be empty): |
||||
DROP TABLE test_enc; |
||||
DROP EXTENSION pg_tde; |
@ -0,0 +1,25 @@ |
||||
CREATE EXTENSION pg_tde; |
||||
-- server restart |
||||
CREATE TABLE test_enc(id SERIAL,k INTEGER,PRIMARY KEY (id)) USING tde_heap_basic; |
||||
INSERT INTO test_enc (k) VALUES (5),(6); |
||||
SELECT * FROM test_enc ORDER BY id ASC; |
||||
1|5 |
||||
2|6 |
||||
-- ROTATE KEY pg_tde_rotate_principal_key('rotated-principal-key','file-2'); |
||||
SELECT * FROM test_enc ORDER BY id ASC; |
||||
1|5 |
||||
2|6 |
||||
-- server restart |
||||
SELECT * FROM test_enc ORDER BY id ASC; |
||||
1|5 |
||||
2|6 |
||||
-- ROTATE KEY pg_tde_rotate_principal_key(); |
||||
SELECT * FROM test_enc ORDER BY id ASC; |
||||
1|5 |
||||
2|6 |
||||
-- server restart |
||||
SELECT * FROM test_enc ORDER BY id ASC; |
||||
1|5 |
||||
2|6 |
||||
DROP TABLE test_enc; |
||||
DROP EXTENSION pg_tde; |
@ -0,0 +1,12 @@ |
||||
CREATE EXTENSION pg_tde; |
||||
CREATE TABLE test_enc2(id SERIAL,k INTEGER,PRIMARY KEY (id)) USING tde_heap_basic; |
||||
INSERT INTO test_enc2 (k) VALUES (5),(6); |
||||
SELECT * FROM test_enc2 ORDER BY id ASC; |
||||
1|5 |
||||
2|6 |
||||
-- server restart |
||||
SELECT * FROM test_enc2 ORDER BY id ASC; |
||||
1|5 |
||||
2|6 |
||||
DROP TABLE test_enc2; |
||||
DROP EXTENSION pg_tde; |
@ -0,0 +1,12 @@ |
||||
CREATE EXTENSION pg_tde; |
||||
CREATE TABLE test_enc1(id SERIAL,k INTEGER,PRIMARY KEY (id)) USING tde_heap_basic; |
||||
INSERT INTO test_enc1 (k) VALUES (5),(6); |
||||
SELECT * FROM test_enc1 ORDER BY id ASC; |
||||
1|5 |
||||
2|6 |
||||
-- server restart |
||||
SELECT * FROM test_enc1 ORDER BY id ASC; |
||||
1|5 |
||||
2|6 |
||||
DROP TABLE test_enc1; |
||||
DROP EXTENSION pg_tde; |
Loading…
Reference in new issue