From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: infinite loop in _bt_getstackbuf |
Date: | 2014-10-31 03:45:19 |
Message-ID: | 20141031034519.GB417926@tornado.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Oct 30, 2014 at 03:52:01PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > Robert Haas wrote:
> >> A colleague at EnterpriseDB today ran into a situation on PostgreSQL
> >> 9.3.5 where the server went into an infinite loop while attempting a
> >> VACUUM FREEZE; it couldn't escape _bt_getstackbuf(), and it couldn't
> >> be killed with ^C. I think we should add a check for interrupts into
> >> that loop somewhere;
>
> > Our design principle in this area is that all loops should have
> > CHECK_FOR_INTERRUPTS() calls somewhere, so that even if data is horribly
> > corrupted you can get out of it.
>
> FWIW, I concur with Alvaro that adding a CHECK_FOR_INTERRUPTS() needn't
> require much discussion.
+1
> Given the lack of prior complaints about this
> loop, I'm not sure I see the need to work harder than that; corruption
> of this sort must be quite rare.
Looks like _bt_getstackbuf() is always called with some buffer lock held, so
CHECK_FOR_INTERRUPTS() alone would not help:
http://www.postgresql.org/message-id/flat/16519(dot)1401395152(at)sss(dot)pgh(dot)pa(dot)us
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-10-31 03:52:57 | Re: infinite loop in _bt_getstackbuf |
Previous Message | Tom Lane | 2014-10-31 03:25:13 | Re: TAP test breakage on MacOS X |