Re: infinite loop in _bt_getstackbuf - Mailing list pgsql-hackers

From Tom Lane
Subject Re: infinite loop in _bt_getstackbuf
Date
Msg-id 8287.1414698721@sss.pgh.pa.us
Whole thread Raw
In response to Re: infinite loop in _bt_getstackbuf  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: infinite loop in _bt_getstackbuf
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.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.  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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: WAL format and API changes (9.5)
Next
From: Tom Lane
Date:
Subject: Re: alter user/role CURRENT_USER