Using citus_tables in transactions may result in warning regarding citus size functions
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
Steps to repro:
```SQL
create table t1(a int);
CREATE TABLE
Time: 3.252 ms
create table t2(a int);
CREATE TABLE
Time: 3.115 ms
SELECT create_distributed_table('t1', 'a');
create_distributed_table
--------------------------
(1 row)
Time: 33.936 ms
SELECT create_distributed_table('t2', 'a');
create_distributed_table
--------------------------
(1 row)
Time: 31.148 ms
select alter_table_set_access_method(table_name, 'columnar') FROM citus_tables;
NOTICE: creating a new table for public.t1
NOTICE: moving the data of public.t1
NOTICE: dropping the old public.t1
NOTICE: renaming the new table to public.t1
**WARNING: citus size functions cannot be called in transaction blocks which contain multi-shard data modifications**
NOTICE: creating a new table for public.t2
NOTICE: moving the data of public.t2
NOTICE: dropping the old public.t2
NOTICE: renaming the new table to public.t2
alter_table_set_access_method
-------------------------------
(2 rows)
Time: 191.013 ms
```
Contributor guide
Assessment
This issue has not been assessed yet.