Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Busy is often displayed when data is inserting #1461

Closed
yjclsx opened this issue Oct 22, 2021 · 5 comments
Closed

Table Busy is often displayed when data is inserting #1461

yjclsx opened this issue Oct 22, 2021 · 5 comments
Labels
Postgres Wire Issues or changes relating to Postres wire protocol

Comments

@yjclsx
Copy link

yjclsx commented Oct 22, 2021

The error message is:

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)
  at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
  at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81)
  at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
  at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447)
  at com.sun.proxy.$Proxy89.insert(Unknown Source)
  at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:279)
  at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:56)
  at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
  at com.sun.proxy.$Proxy101.insert(Unknown Source)
  at com.secusoft.service.impl.quest.CameraAccessDetailsServiceImpl.insert(CameraAccessDetailsServiceImpl.java:341)
  at com.secusoft.service.impl.quest.CameraAccessDetailsServiceImpl$$FastClassBySpringCGLIB$$2703e86a.invoke(<generated>)
  at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
  at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721)
  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
@bsmth bsmth added this to To be reproduced in InfluxDB Line Protocol via automation Oct 22, 2021
@ideoma ideoma moved this from To be reproduced to Awaiting triage in InfluxDB Line Protocol Oct 22, 2021
@ideoma ideoma removed this from Awaiting triage in InfluxDB Line Protocol Oct 22, 2021
@ideoma ideoma added this to To be reproduced in PostgreSQL wire protocol via automation Oct 22, 2021
@ideoma ideoma moved this from To be reproduced to Awaiting triage in PostgreSQL wire protocol Oct 22, 2021
@ideoma
Copy link
Collaborator

ideoma commented Oct 22, 2021

QuestDB does not support concurrent writes to the same table from Postgres wire protocol at the moment.

REST api automatically retries inserts and ILP allow writing from concurrent connections

@davidsiu
Copy link

davidsiu commented Nov 4, 2021

QuestDB does not support concurrent writes to the same table from Postgres wire protocol at the moment.

REST api automatically retries inserts and ILP allow writing from concurrent connections

Wow, that is a big gotcha. I burned too many hours messing around with the configuration in hopes of getting past this. Thx @ideoma for explaining. Is there anywhere were I can find other similar limitations or know if this is on their radar?

@Andavin
Copy link

Andavin commented Nov 6, 2021

QuestDB does not support concurrent writes to the same table from Postgres wire protocol at the moment.

REST api automatically retries inserts and ILP allow writing from concurrent connections

Just ran into this today after a ton of work setting up our logging with Postgres. This is a huge handicap for Postgres in my opinion and it doesn't seem to be actually documented anywhere.

Is there a timeline on when or if this might be fixed?

@pswu11 pswu11 added the Postgres Wire Issues or changes relating to Postres wire protocol label Dec 15, 2021
@puzpuzpuz
Copy link
Contributor

Should be fixed now on WAL-enabled tables: https://questdb.io/docs/concept/write-ahead-log/

PostgreSQL wire protocol automation moved this from Awaiting triage to Done Aug 16, 2023
@yjclsx
Copy link
Author

yjclsx commented Aug 16, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Postgres Wire Issues or changes relating to Postres wire protocol
Development

No branches or pull requests

6 participants