Re: ERROR: deadlock detected - Mailing list pgsql-general

From Laurenz Albe
Subject Re: ERROR: deadlock detected
Date
Msg-id 7750570f26a2d763c3e0b6a7b1334b1a38fa17e0.camel@cybertec.at
Whole thread Raw
In response to ERROR: deadlock detected  (Matthias Apitz <guru@unixarea.de>)
List pgsql-general
On Tue, 2023-02-07 at 12:46 +0100, Matthias Apitz wrote:
> We saw the following message in the file postgres-serverlog.error:
>
> 2023-01-24 17:16:16.578 CET [17468] ERROR:  deadlock detected
> 2023-01-24 17:16:16.578 CET [17468] DETAIL:  Process 17468 waits for ShareLock on transaction 90776649; blocked by
process17724. 
>         Process 17724 waits for ShareLock on transaction 90776650; blocked by process 17468.
>         Process 17468: fetch hc_d03geb
>         Process 17724: fetch hc_d02ben
> 2023-01-24 17:16:16.578 CET [17468] HINT:  See server log for query details.
> 2023-01-24 17:16:16.578 CET [17468] CONTEXT:  while locking tuple (948,45) in relation "d03geb"
> 2023-01-24 17:16:16.578 CET [17468] STATEMENT:  fetch hc_d03geb
>
> There are no messages in the serverlog itself and in our application
> log files. What can we do to get to more information (may be next time)?

There will be a message in the server log, unless you set "log_min_messages"
to "fatal" or higher.

> The process numbers are internal ones of the PostgreSQL server and not
> the Linux PID, correct?

PostgreSQL uses the process number of the backend process on the database
server as identifier of a session, so it is indeed an operatin system process ID.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: PostgreSQL
Next
From: Joseph Kennedy
Date:
Subject: Re: PostgreSQL