>Yes, we need to connect to the database for performing rollback
>actions.  Once the rollback for that database is over, undo apply
>worker will exit and you should be able to drop the database.

Thank you, Amit.
Can you have a look at this one?

create table t1 ( a text ) partition by list (a);
create table t1_1 PARTITION of t1 (a) for values in ('a');
create table t1_2 PARTITION of t1 (a) for values in ('b');
create table t1_3 PARTITION of t1 (a) for values in ('c');
create table t1_4 PARTITION of t1 (a) default;

postgres=# \d+ t1
                                   Table "public.t1"
 Column | Type | Collation | Nullable | Default | Storage  | Stats target | 
Description 
--------+------+-----------+----------+---------+----------+--------------+-------------
 a      | text |           |          |         | extended |              | 
Partition key: LIST (a)
Partitions: t1_1 FOR VALUES IN ('a'),
            t1_2 FOR VALUES IN ('b'),
            t1_3 FOR VALUES IN ('c'),
            t1_4 DEFAULT
Options: storage_engine=zheap


insert into t1 select 'a' from generate_series ( 1, 1000000 );
insert into t1 select 'b' from generate_series ( 1, 1000000 );
insert into t1 select 'c' from generate_series ( 1, 1000000 );

postgres=# begin;
BEGIN
postgres=# update t1 set a = 'd' where a = 'a';
UPDATE 1000000
postgres=# rollback;
ROLLBACK
postgres=# select * from t1 where a = 'd';
postgres=# select * from t1 where a = 'd';
postgres=# select * from t1 where a = 'd';

The selects at the end take seconds and a lot of checkpoints are happening.

Regards
Daniel






Reply via email to