Re: DELETE Query Hang

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: DrakoRod <drakoflames(at)hotmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: DELETE Query Hang
Date: 2019-11-12 22:51:47
Message-ID: 76A5FD11-401A-44FB-A68E-6E309EE27C83@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Nov 12, 2019, at 3:47 PM, DrakoRod <drakoflames(at)hotmail(dot)com> wrote:
>
> Hi folks!
>
> I Have a question, in a database are a table with many files (bytea) stored
> (I support this database a don't design it), but we need delete many rows
> (38000 rows approx), but I when execute query:
>
> BEGIN;
> ALTER TABLE my_file_table DISABLE TRIGGER ALL;
> DELETE FROM my_file_table WHERE id_table <> 230;
>
> This query hang... 50 minutes and the query do not finish.
>
> Any suggestion?
>
>

You don’t mention which version you’re using be I had this trouble long ago on version 9 when deleting blobs (toast data). You can only wait. Or kill it and do smaller batches.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message DrakoRod 2019-11-12 23:01:21 Re: DELETE Query Hang
Previous Message DrakoRod 2019-11-12 22:47:18 DELETE Query Hang