我正在Paralell中运行多个查询(在不同的会话中),这些查询使用以下代码,有时在Paralell中,有时会收到错误消息,指出临时表已经存在。我的印象是临时表将在后台处理中使用某种随机名称,因此它们不会互相干扰:
select country_id,product_category_id,sum(units) as total_units
into temp totals
from schema.table
group by country_id,product_category_id;
我得到这个:
查询失败:错误:关系“总计”已存在。
Postgres版本为9.4,仅在使用pgbouncer端口时发生
我做错什么了吗?我应该改用创建临时表吗?
谢谢