public inbox for [email protected]  
help / color / mirror / Atom feed
From: Fabrice Chapuis <[email protected]>
To: [email protected]
Subject: Re: infinite loop in an update statement
Date: Wed, 11 Sep 2024 12:14:19 +0200
Message-ID: <CAA5-nLD9tFX_AMNP2hbh_OD2FHoSfjp0PQHR4BTzDNO4NvUiBg@mail.gmail.com> (raw)
In-Reply-To: <CAA5-nLAqRy5-3DkoDZn-k2quAvqUx6KwT=_JcHouAqX4poMm0A@mail.gmail.com>
References: <CAA5-nLDmkuRbjHJvf2-Sz0FxtJtoFdrg4mUTy6N84UpZtGZJwQ@mail.gmail.com>
	<[email protected]>
	<CAA5-nLAqRy5-3DkoDZn-k2quAvqUx6KwT=_JcHouAqX4poMm0A@mail.gmail.com>

On Tue, Sep 10, 2024 at 4:49 PM Fabrice Chapuis <[email protected]>
wrote:

> no lock, in view pg_stat_activity
>
> status = active
> wait event = NULL
> wait event type = NULL
>
> On Mon, Sep 9, 2024 at 5:00 PM Tom Lane <[email protected]> wrote:
>
>> Fabrice Chapuis <[email protected]> writes:
>> > why this update does not return instantly?
>>
>> > UPDATE table_a a
>> >  SET col1 = (SELECT MIN(b.col1)
>> >                     FROM table_b b
>> >                     WHERE b.col2 = a.col2)
>>
>> Maybe query is waiting for a lock on one of those tables?
>>
>>                         regards, tom lane
>>
>


view thread (2+ 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]
  Subject: Re: infinite loop in an update statement
  In-Reply-To: <CAA5-nLD9tFX_AMNP2hbh_OD2FHoSfjp0PQHR4BTzDNO4NvUiBg@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