Logo
latest

Contents:

  • Getting Started
    • Preparing Your Machine to Install SQream
    • Installing SQreamDB
    • Executing Statements in SQreamDB
    • Performing Basic SQream Operations
      • Running the SQream SQL Client
      • Creating Your First Table
      • Listing Tables
      • Inserting Rows
      • Running Queries
      • Deleting Rows
      • Saving Query Results to a CSV or PSV File
    • Hardware Guide
    • Staging and Development Hardware Guide
  • Installation Guides
    • Installing and Launching SQream
      • Recommended Pre-Installation Configuration
      • Installing SQream Using Binary Packages
      • Installing Monit
      • Launching SQream with Monit
    • Installing SQream Studio
      • Installing Prometheus Exporter
      • Installing Prometheus Using Binary Packages
      • Installing the Dashboard Data Collector
      • Installing Studio on a Stand-Alone Server
      • Installing an NGINX Proxy Over a Secure Connection
  • Upgrade Guides
    • Version Upgrade
    • Upgrade-Related Configuration Changes
  • Operational Guides
    • Access Control
      • Overview
      • Password Policy
      • Managing Roles
      • Permissions
      • Departmental Example
    • Creating or Cloning Storage Clusters
    • Working with External Data
      • Inserting Data Using Amazon S3
      • Using SQream in an HDFS Environment
    • Foreign Tables
    • Deleting Data
    • Logging
    • Monitoring Query Performance
    • Security
    • Saved Queries
    • Seeing System Objects as DDL
    • Optimization and Best Practices
  • Configuration Guides
    • Configuring SQream
      • Cluster and Session
      • Workers
      • Modification Methods
      • Parameter Values
      • Showing All Flags in the Catalog Table
    • Configuring LDAP authentication
  • System Architecture
    • Internals and Architecture
    • Filesystem and Usage
    • Sizing
  • SQreamDB Acceleration Studio
    • Getting Started with SQream Acceleration Studio
    • Monitoring Workers and Services from the Dashboard
    • Executing Statements and Running Queries from the Editor
    • Viewing Logs
    • Creating, Assigning, and Managing Roles and Permissions
    • Configuring Your Instance of SQreams
  • Connecting to SQreamDB
    • Client Platforms
      • Denodo Platform
      • Informatica Cloud Services
      • MicroStrategy
      • Pentaho Data Integration
      • BI Desktop
      • R
      • SAP BusinessObjects
      • SAS Viya
      • SQL Workbench
      • Tableau
      • Talend
      • TIBCO Spotfire
    • Client Drivers
      • JDBC
      • Python (pysqream)
      • Node.JS
      • ODBC
        • Install and Configure ODBC on Windows
        • Install and configure ODBC on Linux
      • SQreamNET
  • Data Ingestion Sources
    • Overview
    • Avro
    • CSV
    • Parquet
    • ORC
    • JSON
    • External Databases
  • External Storage Platforms
    • Azure Blob Storage
    • Google Cloud Platform
    • HDFS Environment
    • Amazon Web Services
  • Feature Guides
    • Automatic Foreign Table DDL Resolution
    • Query Healer
    • Compression
    • Python UDF (User-Defined Functions)
    • Workload Manager
    • Concurrency and Locks
  • References
    • SQL Statements and Syntax
      • SQL Syntax Features
      • SQL Statements
      • SQL Functions
        • Built-In Scalar Functions
        • User-Defined Functions
        • Aggregate Functions
        • Window Functions
    • Catalog Reference
      • Catalog Tables
      • Additional Tables
      • Examples
    • Command line programs
      • metadata_server
      • sqreamd
      • sqream-console
      • Server Picker
      • SqreamStorage
      • sqream sql
      • upgrade_storage
    • SQL Feature Checklist
  • Data Types
    • Supported Data Types
      • Primitive Data Types
      • Array
    • Casts and Conversions
    • Supported Casts
      • Numeric
      • Boolean
      • Integer
      • Floating Point
      • String
      • Date
  • Release Notes
    • 4.0 Release Notes
      • Release Notes 4.0
      • Release Notes 4.1
      • Release Notes 4.2
      • Release Notes 4.3
      • Release Notes 4.4
      • Release Notes 4.5
    • Release Notes 2022.1
      • Release Notes 2022.1.7
      • Release Notes 2022.1.6
      • Release Notes 2022.1.5
      • Release Notes 2022.1.4
      • Release Notes 2022.1.3
      • Release Notes 2022.1.2
      • Release Notes 2022.1.1
      • Release Notes 2022.1
    • Release Notes 2021.2
      • Release Notes 2021.2.1.24
      • Release Notes 2021.2.1
      • Release Notes 2021.2
  • Troubleshooting
    • Remedying Slow Queries
    • Resolving Common Issues
    • Identifying Configuration Issues
    • Lock Related Issues
    • Log Related Issues
    • Core Dumping Related Issues
    • Retrieving Execution Plan Output Using SQreamDB Studio
    • Gathering Information for SQream Support
  • Glossary
SQream DB
  • Troubleshooting
  • Lock Related Issues

Lock Related Issues

Sometimes, a rare situation can occur where a lock is never freed.

The workflow for troubleshooting locks is:

  1. Identify which statement has obtained locks

  2. Understand if the statement is itself stuck, or waiting for another statement

  3. Try to abort the offending statement

  4. Force the stale locks to be removed

For example, we will assume that the statement from the previous example is stuck (statement #287). We can attempt to abort it using STOP_STATEMENT:

t=> SELECT STOP_STATEMENT(287);
executed

If the locks still appear in the SHOW_LOCKS utility, we can force remove the stale locks:

t=> SELECT RELEASE_DEFUNCT_LOCKS();
executed

Tip

RELEASE_DEFUNCT_LOCKS has an optional input parameter to specify the number of seconds, after which RELEASE_DEFUNCT_LOCKS will execute.

Warning

This operation can cause some statements to fail on the specific worker on which they are queued. This is intended as a “last resort” to solve stale locks.

Previous Next

© Copyright 2023 SQream. Revision 6d8206d8.

SQream DB v: latest
Versions
latest
2022.1.7
2022.1.6
2022.1.5
2022.1.4
2022.1.3
2022.1.2
2022.1.1
2022.1
2021.2.1.24
2021.2
4.5
4.4
4.3
4.2
4.1
4.0
blue
Downloads
pdf
html