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

[Bug]: Compression doesn't handle visibility correctly #6842

Open
erimatnor opened this issue Apr 19, 2024 · 0 comments
Open

[Bug]: Compression doesn't handle visibility correctly #6842

erimatnor opened this issue Apr 19, 2024 · 0 comments

Comments

@erimatnor
Copy link
Contributor

What type of bug is this?

Incorrect result

What subsystems and features are affected?

Compression

What happened?

When compressing a chunk, other session/backends running in isolation level repeatable read or higher can have data disappear that they should see. For example if data is deleted and then compressed, the deleted data will not be visible to other concurrent session.

TimescaleDB version affected

2.14.2

PostgreSQL version used

16

What operating system did you use?

Ubuntu 23.10

What installation method did you use?

Source

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. Start a transaction in session A using repeatable read
2. Query at least one table which is not the one to compress in order to initialize a snapshot
3. In another session B delete data from a chunk.
4. Query the chunk in A and the deleted data should still be visible.


Repeat the above, but also compress the chunk between step 3 and 4. This will make the deleted data disappear in step 4.

Repeat the above, but instead run VACUUM FULL on the chunk between step 3 and 4. This rewrites the relation similar to compression, but works properly in step 4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant