agora inbox for pgsql-admin@postgresql.org
help / color / mirror / Atom feedFrom: Laurenz Albe <laurenz.albe@cybertec.at>
To: M Sarwar <sarwarmd02@outlook.com>
To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>
Subject: Re: Truncate DUMMY_mid is blocked DELETE DUMMY_init TABLE
Date: Thu, 06 Jun 2024 09:58:09 +0200
Message-ID: <f4fdb3876763f5a3b38bb9a2bd6972e2dd2b5846.camel@cybertec.at> (raw)
In-Reply-To: <DM4PR19MB59783696112303CE33432F22D3F92@DM4PR19MB5978.namprd19.prod.outlook.com>
References: <DM4PR19MB59783696112303CE33432F22D3F92@DM4PR19MB5978.namprd19.prod.outlook.com>
On Wed, 2024-06-05 at 21:23 +0000, M Sarwar wrote:
> Today I have an interesting observation.
> I am truncating the table DUMMY_mid .
> Truncate is getting struck due to DELETE operation on the table DUMMY_init.
>
>
> When I take a look at the PG_STAT_ACTIVITY table, it is confirmed that
> the TRUNCATE is blocked by DELETE on DUMMY_INIT table.
> This seems to be strange to me.
In "pg_stat_activity", you only see the last SQL statement that was executed
on that connection. There might have been other SQL statements earlier in the
same transaction that read or in some other way used "DUMMY_mid".
Yours,
Laurenz Albe
view thread (4+ messages)
Message-ID: <f4fdb3876763f5a3b38bb9a2bd6972e2dd2b5846.camel@cybertec.at>
Permalink: ../f4fdb3876763f5a3b38bb9a2bd6972e2dd2b5846.camel@cybertec.at/
Also on: postgresql.org/message-id/f4fdb3876763f5a3b38bb9a2bd6972e2dd2b5846.camel@cybertec.at
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: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, sarwarmd02@outlook.com, pgsql-admin@lists.postgresql.org
Subject: Re: Truncate DUMMY_mid is blocked DELETE DUMMY_init TABLE
In-Reply-To: <f4fdb3876763f5a3b38bb9a2bd6972e2dd2b5846.camel@cybertec.at>
* 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