Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfiRO-0001uy-SW for pgsql-general@arkaria.postgresql.org; Sat, 16 Apr 2022 13:26:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nfiRL-0000Kk-T1 for pgsql-general@arkaria.postgresql.org; Sat, 16 Apr 2022 13:26:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfiRL-0000GQ-18 for pgsql-general@lists.postgresql.org; Sat, 16 Apr 2022 13:26:15 +0000 Received: from bee.birch.relay.mailchannels.net ([23.83.209.14]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfiR6-0000DV-T4 for pgsql-general@postgresql.org; Sat, 16 Apr 2022 13:26:13 +0000 X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C530B20DAA for ; Sat, 16 Apr 2022 13:25:58 +0000 (UTC) Received: from mi3-ss4.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 426D720F26 for ; Sat, 16 Apr 2022 13:25:58 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1650115558; a=rsa-sha256; cv=none; b=VzorqzMLzFlLDUCVGKAf06EcdD+zKdbZmcpJYMlWo00CqCvpq6/wvY6Gy9lVyg43PbdOnH LBxe6IUjMJKSrbg7hJOAw+yMjNXB3VbjObznu9nuHPkaOvxPCbIrv0rs9mfIt6IrrYcwgM 0WF9MTpjWQ9SGEi49yJobbzwX+L727SmTD56HZPkZN9vypfJDElzuDj5ZRgm9gp0QXMxOd XSpnGQkHF36PhlEZ1ftctbHWgrhIZeK0Z+srrJz0c1Hpfq8l4T1OOIsNnfbD9hZuoA+bzO uALnhuLA0RviJqQlcs0kJUamUlqmMq64ldQpDWLrVn07O4r65GJFkzXyuN3Q8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1650115558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=qgTml6ET9yHI+M5hmGDFpxaTEduLR3IMsOE6VQOaONQ=; b=8v/OaMitx1oLw11QyjEusVbqV8n/WwKH3oT4gsz05TwGdXU2h80naT/ANz4Mp9DgK4Q1Jf r/slw6z/j85aQB6tHEZ3H2IHfT1nyoCeu5KvE3wx5wPrpsB9yL/5JVUOUKkSw/UfXF9C76 gjC2kVtGyKdJ+zhqo8rrjvgHEOtSFhRXFWYAJDUHUj4q5ehEHB0tcJV651d+GnBVo5e9lg u5OSYCcP43KR20H0wzdF+/jezq7bAum/WYAkBtL/48ii1HJuueVF1GU2RZB+fue3+ue30z SqjDTXp9D7yDDfrIDIe3LxoLVd8EQgoTCjwUcK/mMYgUxkS7isp+qfBz2NgFrA== ARC-Authentication-Results: i=1; rspamd-5f678fb567-m54kg; auth=pass smtp.auth=a2hosting smtp.mailfrom=pedz@easesoftware.com X-Sender-Id: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com Received: from mi3-ss4.a2hosting.com (mi3-ss4.a2hosting.com [68.66.200.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.124.238.110 (trex/6.7.1); Sat, 16 Apr 2022 13:25:58 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|pedz+easesoftware.com@mi3-ss4.a2hosting.com X-MailChannels-Auth-Id: a2hosting X-Robust-Relation: 316eccd32407bf1e_1650115558611_3469824416 X-MC-Loop-Signature: 1650115558611:2431313071 X-MC-Ingress-Time: 1650115558611 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=easesoftware.com; s=default; h=To:Date:Message-Id:Subject:Mime-Version: Content-Type:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qgTml6ET9yHI+M5hmGDFpxaTEduLR3IMsOE6VQOaONQ=; b=JTD+FoUnwp5qshwZWIivGiU/A1 ENsnhRnWmEZmawSpBrVujAZJT4vuwxuglcneV97EY+6Pe6ZE9xJKUa3dlYpaHall9mnd5+vMFUcRx CRXgy8zxKeosk10DixeEFalXj3sgwzeSlzzR9YzDFrpQd+0+4Mp+HlEhVz9I0lm+P7H8W3Va0d2le gjX37pJ/nEAFGJnLJWfiNf5SPi6NKB7xZA3MM2jEToqNjJVVuTHK2M0YQpZ2+qsrUXAzi0sy5T7sY x8ZbIiAbdQxOTqdSdkBocW+vBUvACF9L77NpXXk4Ui4uP0yMuDsK5ddAEeCcrwjfuklD8F+4+pEHA tClCeFQQ==; Received: from cpe-70-94-128-193.satx.res.rr.com ([70.94.128.193]:54889 helo=smtpclient.apple) by mi3-ss4.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nfiR2-0002Vq-VD for pgsql-general@postgresql.org; Sat, 16 Apr 2022 09:25:57 -0400 From: Perry Smith Content-Type: multipart/signed; boundary="Apple-Mail=_04504F74-5ACB-4C0E-9688-BD7AE946AC8D"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Help with large delete Message-Id: <3823FD54-2910-41E5-B908-869DA917DE82@easesoftware.com> Date: Sat, 16 Apr 2022 08:25:56 -0500 To: "pgsql-general@postgresql.org" X-Mailer: Apple Mail (2.3696.80.82.1.1) X-AuthUser: pedz+easesoftware.com@mi3-ss4.a2hosting.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_04504F74-5ACB-4C0E-9688-BD7AE946AC8D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Currently I have one table that mimics a file system. Each entry has a = parent_id and a base name where parent_id is an id in the table that = must exist in the table or be null with cascade on delete. I=E2=80=99ve started a delete of a root entry with about 300,000 = descendants. The table currently has about 22M entries and I=E2=80=99m = adding about 1600 entries per minute still. Eventually there will not = be massive amounts of entries being added and the table will be mostly = static. I started the delete before from a terminal that got detached. So I = killed that process and started it up again from a terminal less likely = to get detached.=CB=98 My question is basically how can I make life easier for Postgres? I = believe (hope) the deletes will be few and far between but they will = happen from time to time. In this case, Dropbox =E2=80=94 its a long = story that isn=E2=80=99t really pertinent. The point is that @#$% = happens. =E2=80=9CWhat can I do=E2=80=9D includes starting completely over if = necessary. I=E2=80=99ve only got about a week invested in this and its = just machine time at zero cost. I could stop the other processes that = are adding entries and let the delete finish if that would help. etc. Thank you for your time, Perry --Apple-Mail=_04504F74-5ACB-4C0E-9688-BD7AE946AC8D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5yOa/gCtQpb3oCpljxzk9yzE+MAFAmJaw+QACgkQjxzk9yzE +MCHVRAAml6nITW4xqY3m3BQsBwm7kMUo+SALEV6MBqvljQb4FjIABFDr7XawgQW VH+JyUNMEnYd1Amc9jaFhf7gkVEDmvk5a7z+uv/mQWKIUbxctJ43c+nSLLOlMoic KLNJ2vTK4Ub3BLaNgGmQJcHXuq5mY4qnZxsWle9ws8Dn2StDkdr87go6Vshloy3L BFm6EcBWzu5eB8GCrpa1was02Qxk4LbmrknRELTvIrwnaIiYJIClOn7b+WMiql1B URcfWE0sw1Q7UjMW7olgqpu6S8Oq/YWAfDZ0LhAhx16IUVsgyC9vp5joTxyroHC1 M0oi5ri3olui9ugWEqBdlApfJJamNmOqVIm1c6dlB0zqc/FtlWGhMd/gI732dQlo nBQgu4LbAI0TWEC6k5VI3RNlUm0Pm+PY0V6AvSxfUywIoh8ej6L70/ZND3C4ZoDV ip3ubeMGFUOPw3A3S2HDX9Z2K584n3dxau1GLCF7YiKcOZMq0UGMGgkWMfnh3rns NX0C1rrbPIHaNL1AMBtFr3t8eiR6moJPCUTHqKPY8eVuL5Kjwm5joLshxk23tyFG ujEFD/9/pUifyBQCTukx5ytC8JPxDoOzCaeB1sqgNigndEXmqmsef5nq6n+TfoxY 4MXJCGpVh5B6nXwNv1C5Waor9xLxWzzP90cGvlH/3sG1SXq9/24= =6fDN -----END PGP SIGNATURE----- --Apple-Mail=_04504F74-5ACB-4C0E-9688-BD7AE946AC8D--