Help with large delete - Mailing list pgsql-general

From Perry Smith
Subject Help with large delete
Date
Msg-id 3823FD54-2910-41E5-B908-869DA917DE82@easesoftware.com
Whole thread Raw
Responses Re: Help with large delete  (Rob Sargent <robjsargent@gmail.com>)
Re: Help with large delete  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Re: Help with large delete  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Help with large delete  (Jan Wieck <jan@wi3ck.info>)
List pgsql-general
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
idin the table that must exist in the table or be null with cascade on delete. 

I’ve started a delete of a root entry with about 300,000 descendants.  The table currently has about 22M entries and
I’madding about 1600 entries per minute still.  Eventually there will not be massive amounts of entries being added and
thetable 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
terminalless likely to get detached.˘ 

My question is basically how can I make life easier for Postgres?  I believe (hope) the deletes will be few and far
betweenbut they will happen from time to time.  In this case, Dropbox — its a long story that isn’t really pertinent.
Thepoint is that @#$% happens. 

“What can I do” includes starting completely over if necessary.  I’ve only got about a week invested in this and its
justmachine time at zero cost.  I could stop the other processes that are adding entries and let the delete finish if
thatwould help.  etc. 

Thank you for your time,
Perry


Attachment

pgsql-general by date:

Previous
From: "Sonai muthu raja M"
Date:
Subject: Re: Require details that can we see the password history to a User account in PostgreSQL Database.
Next
From: Rob Sargent
Date:
Subject: Re: Help with large delete