Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 795321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:27:42+00:00 2026-05-14T22:27:42+00:00

Table output_values_center1 (and some other) inherits output_values . Periodically I truncate table output_values_center1 and

  • 0

Table output_values_center1 (and some other) inherits output_values. Periodically I truncate table output_values_center1 and load new data (in one transaction). In that time user can request some data and he got error message. Why it ever happens (select query requests only one record) and how to avoid such problem:

2010-05-19 14:43:17 UTC ERROR:  deadlock detected
2010-05-19 14:43:17 UTC DETAIL:  Process 25972 waits for AccessShareLock on relation  2495092 of database 16385; blocked by process 26102.
    Process 26102 waits for AccessExclusiveLock on relation 2494865 of database 16385; blocked by process 25972.
    Process 25972: SELECT * FROM "output_values" WHERE ("output_values".id = 122312)  LIMIT 1
    Process 26102: TRUNCATE TABLE "output_values_center1"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:27:43+00:00Added an answer on May 14, 2026 at 10:27 pm

    “TRUNCATE acquires an ACCESS EXCLUSIVE lock on each table it operates on, which blocks all other concurrent operations on the table. If concurrent access to a table is required, then the DELETE command should be used instead.”

    Obviously it’s not clear if you just look at the “manpage” linked above why querying the parent table affects its descendant. The following excerpt from the “manpage” for the SELECT command clarifies it:

    “If ONLY is specified, only that table is scanned. If ONLY is not specified, the table and any descendant tables are scanned.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm new here. i create a table which can show the data from the
I'd like to know if there's a way that one can output data from
I have a program that outputs a table, and I was wondering if there
I have a table which i want to store all the outputs into one
I am displaying the database table values using data tables. I am doing this
I have a table that displays months(Jan through Dec) in a table as follows.
I'm getting acquainted with GWTP. I tried to output a table, that would contain
I looked through the questions here but didn't find one that suited my case.
I have a mysql table with several values that I output to a web
I have this table that I would like to select values from. The thing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.