首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >questdb:插入数据时经常显示表忙

questdb:插入数据时经常显示表忙
EN

Stack Overflow用户
提问于 2021-10-22 03:55:37
回答 1查看 55关注 0票数 1

插入数据时,经常会显示Table Busy。错误消息为:

代码语言:javascript
运行
复制
Exception in thread "pool-3-thread-1" org.springframework.jdbc.UncategorizedSQLException:

Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: table busy [reason=insert]
The error may involve com.secusoft.mapper.quest.CameraAccessDetailsMapper.insert-Inline
The error occurred while setting parameters
SQL: insert into camera_access_details_1_20211016 values (72, to_timestamp('2021-10-16 22:06:00','yyyy-MM-dd HH:mm:ss'),to_timestamp('2021-10-16 22:07:00','yyyy-MM-dd HH:mm:ss'), 0, 0)
Cause: org.postgresql.util.PSQLException: ERROR: table busy [reason=insert]
; uncategorized SQLException for SQL []; SQL state [00000]; error code [0]; ERROR: table busy [reason=insert]; nested exception is org.postgresql.util.PSQLException: ERROR: table busy [reason=insert]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:84)
...
EN

回答 1

Stack Overflow用户

发布于 2021-10-22 12:01:40

当您使用Postgress connection协议将数据插入到QuestDB中时,写入被强制为单线程。如果同时发生多个写入,则会将table busy错误发送回客户端。

你可以使用REST api,它将自动重试插入,或者ILP,它允许同时从多个连接插入。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69671241

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档