timescaledb icon indicating copy to clipboard operation
timescaledb copied to clipboard

[Bug]: 'ERROR: tuple already updated by self' after inserting data when chunk was dropped

Open banitt opened this issue 2 months ago • 3 comments

What type of bug is this?

Unexpected error

What subsystems and features are affected?

Data ingestion

What happened?

Chunks were dropped from a hypertable by retention policy. When I insert a new row that would be in those chunks I am getting ERROR: tuple already updated by self.

TimescaleDB version affected

2.14.2

PostgreSQL version used

16.2

What operating system did you use?

22.04.4

What installation method did you use?

Deb/Apt

What platform did you run on?

On prem/Self-hosted

Relevant log output and stack trace

No response

How can we reproduce the bug?

1. <hypertable with data>
2. `SELECT DROP_CHUNKS('data', newer_than => '2024-01-01 00:00:00.000+0200')`
3.  INSERT INTO data (time, value) VALUES ('2024-01-02 00:00:00.000+0200', 100)

banitt avatar May 09 '24 11:05 banitt

Do you have any old-format continuous aggregates? You can check with select * from _timescaledb_catalog.continuous_agg where not finalized;. I found one similar report: https://github.com/timescale/timescaledb/issues/5905

akuzm avatar May 10 '24 11:05 akuzm

Do you have any old-format continuous aggregates? You can check with select * from _timescaledb_catalog.continuous_agg where not finalized;. I found one similar report: #5905

This query gives me no results. All the hypertables, ontinuous aggregates etc. were created about 1 month ago.

banitt avatar May 10 '24 11:05 banitt