Thread: pg_prewarm really needs some CHECK_FOR_INTERRUPTS

pg_prewarm really needs some CHECK_FOR_INTERRUPTS

From
Andres Freund
Date:
Hi,

pg_prewarm() currently can't be cannot be interrupted - which seems odd
given that it's intended to read large amounts of data from disk. A
rather slow process.

Unless somebody protests I'm going to add a check to the top of each of
the three loops.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



Re: pg_prewarm really needs some CHECK_FOR_INTERRUPTS

From
Michael Paquier
Date:
On Tue, Nov 11, 2014 at 8:17 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> pg_prewarm() currently can't be cannot be interrupted - which seems odd
> given that it's intended to read large amounts of data from disk. A
> rather slow process.
>
> Unless somebody protests I'm going to add a check to the top of each of
> the three loops.
Good idea, +1.
-- 
Michael



Re: pg_prewarm really needs some CHECK_FOR_INTERRUPTS

From
Robert Haas
Date:
On Tue, Nov 11, 2014 at 6:17 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> pg_prewarm() currently can't be cannot be interrupted - which seems odd
> given that it's intended to read large amounts of data from disk. A
> rather slow process.

Oops.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: pg_prewarm really needs some CHECK_FOR_INTERRUPTS

From
Andres Freund
Date:
On 2014-11-11 12:17:11 +0100, Andres Freund wrote:
> pg_prewarm() currently can't be cannot be interrupted - which seems odd
> given that it's intended to read large amounts of data from disk. A
> rather slow process.
> 
> Unless somebody protests I'm going to add a check to the top of each of
> the three loops.

Pushed to master and 9.4.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services