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

Remove tuple lock on select path #2336

Merged
merged 1 commit into from
Sep 7, 2020

Conversation

mkindahl
Copy link
Contributor

@mkindahl mkindahl commented Sep 7, 2020

When executing a SELECT on a hypertable, it is not possible to acquire
tuple locks since they require a transaction id and transaction ids
cannot be created when running as a standby running in ephemeral
recovery mode.

This commit removes the tuple lock from the SELECT code path. Since
this means that a slice might not be found as a result of a scan, we
need to ignore that dimension slice to avoid a segmentation fault.

@mkindahl mkindahl requested a review from a team as a code owner September 7, 2020 18:02
@mkindahl mkindahl requested review from WireBaron and removed request for a team September 7, 2020 18:02
@mkindahl mkindahl self-assigned this Sep 7, 2020
When executing a SELECT on a hypertable, it is not possible to acquire
tuple locks on hot standbys since they require a transaction id and
transaction ids cannot be created when running as a standby running in
ephemeral recovery mode.

This commit removes the tuple lock from the SELECT code path if running
in recovery mode.
Copy link
Member

@feikesteenbergen feikesteenbergen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@svenklemm
Copy link
Member

dont forget to do similar PR against master

@mkindahl mkindahl merged commit a3ff765 into timescale:1.7.x Sep 7, 2020
@mkindahl mkindahl deleted the remove_select_tuple_lock branch September 7, 2020 18:59
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Sep 7, 2020
This maintenance release contains bugfixes since the 1.7.3 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address an issue with
running queries on compressed hypertables on standby nodes.

**Bugfixes**
* timescale#2336 Remove tuple lock on select path
@svenklemm svenklemm mentioned this pull request Sep 7, 2020
svenklemm added a commit that referenced this pull request Sep 7, 2020
This maintenance release contains bugfixes since the 1.7.3 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address an issue with
running queries on compressed hypertables on standby nodes.

**Bugfixes**
* #2336 Remove tuple lock on select path
svenklemm added a commit that referenced this pull request Sep 7, 2020
This maintenance release contains bugfixes since the 1.7.3 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address an issue with
running queries on compressed hypertables on standby nodes.

**Bugfixes**
* #2336 Remove tuple lock on select path
svenklemm added a commit that referenced this pull request Sep 7, 2020
This maintenance release contains bugfixes since the 1.7.3 release. We deem it
high priority for upgrading if TimescaleDB is deployed with replicas (synchronous
or asynchronous).

In particular the fixes contained in this maintenance release address an issue with
running queries on compressed hypertables on standby nodes.

**Bugfixes**
* #2336 Remove tuple lock on select path
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Sep 7, 2020
This maintenance release contains bugfixes since the 1.7.3 release. We deem it high
priority for upgrading.

In particular the fixes contained in this maintenance release address an issue with
running queries on compressed hypertables on standby nodes.

**Bugfixes**
* timescale#2336 Remove tuple lock on select path
svenklemm added a commit to svenklemm/timescaledb that referenced this pull request Sep 7, 2020
This maintenance release contains bugfixes since the 1.7.3 release. We deem it
high priority for upgrading if TimescaleDB is deployed with replicas (synchronous
or asynchronous).

In particular the fixes contained in this maintenance release address an issue with
running queries on compressed hypertables on standby nodes.

**Bugfixes**
* timescale#2336 Remove tuple lock on select path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants