public inbox for [email protected]
help / color / mirror / Atom feedFrom: James Pang <[email protected]>
To: Tom Lane <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: [email protected]
Subject: Re: a lot of session wait on lock relation
Date: Thu, 15 May 2025 21:32:38 +0800
Message-ID: <CAHgTRffkd2uUKxsRKvC3hU-Vje9S=JHxN134YkVN_WhYOw45-g@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAHgTRfdEVMi_YVuq3M4R4uARhXQ8ZgkMid3LhxjFbS+Y+Z_8GQ@mail.gmail.com>
<[email protected]>
<[email protected]>
thanks, we are checking partition maintain jobs ,that hold access
exclusive lock.
Tom Lane <[email protected]> 於 2025年5月15日週四 下午9:24寫道:
> Laurenz Albe <[email protected]> writes:
> > On Thu, 2025-05-15 at 16:27 +0800, James Pang wrote:
> >> why inserts into partition table cause "relation lock" ?
>
> > Something else does; use the pg_blocking_pids() function with the
> process ID of
> > a blocked backend to find out who is holding the lock.
>
> More specifically: the inserts are only trying to get a shared lock.
> If they are blocked, it's because some other operation is already
> holding an exclusive lock on the table and is not letting go.
> Look for uncommitted DDL changes.
>
> More details about that at [1].
>
> regards, tom lane
>
> [1]
> https://www.postgresql.org/docs/current/explicit-locking.html#LOCKING-TABLES
>
>
>
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: a lot of session wait on lock relation
In-Reply-To: <CAHgTRffkd2uUKxsRKvC3hU-Vje9S=JHxN134YkVN_WhYOw45-g@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox