Re: infinite loop in an update statement

From: Fabrice Chapuis <fabrice636861(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: infinite loop in an update statement
Date: 2024-09-11 10:14:19
Message-ID: CAA5-nLD9tFX_AMNP2hbh_OD2FHoSfjp0PQHR4BTzDNO4NvUiBg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Sep 10, 2024 at 4:49 PM Fabrice Chapuis <fabrice636861(at)gmail(dot)com>
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 <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> Fabrice Chapuis <fabrice636861(at)gmail(dot)com> 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
>>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Munro 2024-09-11 10:44:52 Re: Error:could not extend file " with FileFallocate(): No space left on device
Previous Message Alvaro Herrera 2024-09-11 09:55:59 Re: Error:could not extend file " with FileFallocate(): No space left on device