From: Tom Lane <tgl@sss.pgh.pa.us>
To: Merlin Moncure <mmoncure@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: sequential scans that pick up only deleted records do not honor query cancel or timeout
Date: Tue, 22 May 2012 17:08:32 -0400
Message-ID: <8558.1337720912@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHyXU0xPW=JBur1FvC-ZbKXiLNbVzX6-pHGesfJiTqsMLXpYyQ@mail.gmail.com>
References: <CAHyXU0xPW=JBur1FvC-ZbKXiLNbVzX6-pHGesfJiTqsMLXpYyQ@mail.gmail.com>
Merlin Moncure <mmoncure@gmail.com> writes:
> Basically, $subject says it all. It's pretty easy to reproduce:
> delete all the records from a large table and execute any sequentially
> scanning query before autocvacuum comes around and cleans the table
> up; the query will be uncancellable. This can result in fairly
> pathological behavior in i/o constrained systems because the query
> will bog itself down writing out hint bits for minutes or hours
> without any way to cancel or effective i/o throttling (unlike vacuum).
> IMO, this should be backpatched, and is likely fixed by injecting an
> interrupts check at a strategic location. But where? I was thinking
> in heapgetpage() but here are no checks elsehwere in heapam.c which is
> a red flag.
heapgetpage() seems like the most reasonable place to me, as there we'll
only be making the check once per page not once per tuple.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mmoncure@gmail.com
Subject: Re: sequential scans that pick up only deleted records do not honor query cancel or timeout
In-Reply-To: <8558.1337720912@sss.pgh.pa.us>
References: <CAHyXU0xPW=JBur1FvC-ZbKXiLNbVzX6-pHGesfJiTqsMLXpYyQ@mail.gmail.com> <8558.1337720912@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox