| From: | David Hinkle <hinkle(at)cipafilter(dot)com> |
|---|---|
| To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
| Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Bad planning data resulting in OOM killing of postgres |
| Date: | 2017-02-13 20:43:10 |
| Message-ID: | CACw4T0og=unex9ZTzyHy=TFcuoKpKFvJPU-+e05LLTdSrkVd6g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Thanks Jeff,
No triggers or foreign key constrains:
psql:postgres(at)cipafilter = \d+ titles
Table "public.titles"
Column │ Type │ Modifiers
│ Storage │ Stats target │ Description
─────────┼───────────────────┼──────────────────────────────────────────────────────────┼──────────┼──────────────┼─────────────
title │ character varying │
│ extended │ │
titleid │ integer │ not null default
nextval('titles_titleid_seq'::regclass) │ plain │ │
Indexes:
"titles_pkey" PRIMARY KEY, btree (titleid)
"titles_md5_title_idx" btree (md5(title::text))
Do you see anything in there that would be problematic?
On Mon, Feb 13, 2017 at 2:41 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> On Mon, Feb 13, 2017 at 11:53 AM, David Hinkle <hinkle(at)cipafilter(dot)com>
> wrote:
>>
>> Thanks guys, here's the information you requested:
>>
>> psql:postgres(at)cipafilter = show work_mem;
>> work_mem
>> ──────────
>> 10MB
>> (1 row)
>
>
>
> OK, new theory then. Do you have triggers on or foreign key constraints to
> the table you are deleting from? It queues up each deleted row to go back
> and fire the trigger or validate the constraint at the end of the statement.
> You might need to drop the constraint, or delete in smaller batches by
> adding some kind of dummy condition to the WHERE clause which you
> progressively move.
>
> Or select the rows you want to keep into a new table, and then drop the old
> one, rename the new one, and rebuild any constraints or indexes and other
> dependencies. This can be pretty annoying if there a lot of them.
>
> Cheers,
>
> Jeff
--
David Hinkle
Senior Software Developer
Phone: 800.243.3729x3000
Email: hinkle(at)cipafilter(dot)com
Hours: Mon-Fri 8:00AM-5:00PM (CT)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rader, David | 2017-02-13 20:58:54 | Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary). |
| Previous Message | Jeff Janes | 2017-02-13 20:41:19 | Re: Bad planning data resulting in OOM killing of postgres |