Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUf0y-0000aw-R3 for pgsql-general@arkaria.postgresql.org; Tue, 12 Nov 2019 22:52:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iUf0x-0002L4-Cl for pgsql-general@arkaria.postgresql.org; Tue, 12 Nov 2019 22:51:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUf0x-0002Kw-0m for pgsql-general@lists.postgresql.org; Tue, 12 Nov 2019 22:51:59 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iUf0q-0006sI-E7 for pgsql-general@postgresql.org; Tue, 12 Nov 2019 22:51:58 +0000 Received: by mail-pf1-x441.google.com with SMTP id q13so154799pff.2 for ; Tue, 12 Nov 2019 14:51:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vFy6Ug2G56Sa86a8TWj1svmSHTGNmixGNE79jXx0BM4=; b=Y1ESPB11ie1fQ9SKPfcap10iXz2ggzKL4DH0J6pL+FkZuJaNxVrjwtCfyGZIyGivHt dvzgk5ZP/gYwrSnL+VpGlSFq3Z5VoUPUedIvGumEi/mekIDpT/6i0taT5b5EuCgFrq0T AlCg76T3LONrjcgWW18rV24jDjqAQH9k69tuJmKG1mPPRvHm2o17IlsiKLSJrTb6Xuhc 6JgpdRoHQiRPkr11tvVyOfY6HQcuLAaufnP2FXHlwOXF4NnpUIQPCVQu+CuILVVYHCH3 +Q53gZKdavQB3HtaQeTKm8slvIcbUJMdRLNyDKP91tu0hTZSBffDG5eKhc9bTjFW2tsq f8dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=vFy6Ug2G56Sa86a8TWj1svmSHTGNmixGNE79jXx0BM4=; b=Ji+cEYsdcHDz/gvq+WR8pBqK7mGdLxLmHgLpe3XuYaT/RSZrmCMqRzJU8ueaEmSUck Ie96PEAv9iV2XnbZ3TMQ+heY/j9YqGgyd4iNYRE07cZ/bG9ADn597zUmAhCfukhuWkIW Zo25KXPNI45Hfa5skiicy8N/nWAqLrRxJVuXI5vro79he5SlW78HUwtCdJUrHYGp+jwi vBPwvcWxqKVygekE8J9wm25iV8F01lfIu5mVIiGACDTQHCu7KsEcz7j0FdaLACS94VZj Uwqr+HpjwiMLFhuh+FhpqjtvtG7kByq7ipep/PssXfXU8UWWvOMhpiygM9EWRVhf7c/1 vWSw== X-Gm-Message-State: APjAAAWSm79WoPmfbNzQFfM35No/1ebBskUQ+5V3kI1NIqcANh0dsB9M mipYruoCSzxWq4r2HyJHFQg= X-Google-Smtp-Source: APXvYqwP0eZ2VJ2kPfwUHKqfWqqHWtR0usr2/in10Wnx+Oc5FtRAR9z2PRyYa+gtJ1ax5cSUw0MUyQ== X-Received: by 2002:aa7:93ce:: with SMTP id y14mr437002pff.138.1573599109983; Tue, 12 Nov 2019 14:51:49 -0800 (PST) Received: from [10.106.130.214] ([155.100.47.6]) by smtp.gmail.com with ESMTPSA id c16sm19279pfo.34.2019.11.12.14.51.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Nov 2019 14:51:49 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: DELETE Query Hang From: Rob Sargent In-Reply-To: <1573598838391-0.post@n3.nabble.com> Date: Tue, 12 Nov 2019 15:51:47 -0700 Cc: "pgsql-general@postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: <76A5FD11-401A-44FB-A68E-6E309EE27C83@gmail.com> References: <1573598838391-0.post@n3.nabble.com> To: DrakoRod X-Mailer: Apple Mail (2.3445.104.11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Nov 12, 2019, at 3:47 PM, DrakoRod wrote: >=20 > Hi folks!=20 >=20 > 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:=20 >=20 > BEGIN; > ALTER TABLE my_file_table DISABLE TRIGGER ALL; > DELETE FROM my_file_table WHERE id_table <> 230; >=20 > This query hang... 50 minutes and the query do not finish.=20 >=20 > Any suggestion?=20 >=20 >=20 You don=E2=80=99t mention which version you=E2=80=99re 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.